[Pidgin] #4814: Crash if xmpp pong timeout fires after account is disconnected

Pidgin trac at pidgin.im
Sun Mar 9 22:03:11 EDT 2008


#4814: Crash if xmpp pong timeout fires after account is disconnected
------------------------+---------------------------------------------------
  Reporter:  nosnilmot  |       Owner:  seanegan              
      Type:  defect     |      Status:  assigned              
  Priority:  blocker    |   Milestone:  2.4.0                 
 Component:  XMPP       |     Version:                        
Resolution:             |    Keywords:  jabber xmpp ping crash
   Pending:  0          |  
------------------------+---------------------------------------------------
Comment (by khc):

 I was looking at it today when my coworker told me about this crash.
 Here's what I said in devel at c.p.i

 (17:21:48) khc: bumping up the gtalk timeout causes a crash
 (17:24:03) khc: the core calls the prpl keepalive cb every 30 seconds, so
 it would have called the jabber keepalive 4 times before it notices a
 disconnect, but the disconnects only clears the last keepalive timeout
 callback, so when other disconnect callback comes in, it would be using an
 invalid gc
 (17:26:32) khc: well actually none of the timeout is cleared, because
 jabber_pong_timeout() sets the handle to -1
 (17:30:06) khc: should we call the iq callbacks with NULL packet when
 jabber_close is called? of course we need to make all the callbacks handle
 NULL packets
 (17:32:29) khc: this isn't just a problem for timeout either, looking at
 the code, it seems like we would leak if we disconnect before receiving
 the registration response, for example
 (17:32:51) khc: I _think_ calling the iq callbacks with NULL would fix it,
 but someone should take another look

-- 
Ticket URL: <http://developer.pidgin.im/ticket/4814#comment:10>
Pidgin <http://pidgin.im>
Pidgin


More information about the Tracker mailing list