[PATCH] SILC prpl fixes

Mark Doliner mark at kingant.net
Mon Aug 6 01:49:44 EDT 2007


On Sat, 28 Jul 2007 11:16:03 +0200 (CEST), Pekka Riikonen wrote
> Hello,
> 
> The enclosed patch fixes the following:
> 
> * Various crashes when SILC Toolkit fails to encode or decode a 
> public key
> 
> * The laptop battery draining problem (bug in Red Hat bugzilla) because
>    the SILC Toolkit is polled every few msecs.  Now it is truly 
> event based   and fixes the problem.  Old behavior is preserved for 
> Toolkit's that   doesn't support the feature.

This change causes crashes for me if I set my status to "Online" then change
it back to "Offline" before it's finished connecting (using silc-toolkit-1.1.2).

Here's the backtrace.  I think the problem is that purple_input_add() is being
called to watch the socket, but the watcher is never purple_input_removed()'ed
when signing off.

(gdb) bt
#0  0x00002ba07a848cab in raise () from /lib/libc.so.6
#1  0x00002ba07a84a660 in abort () from /lib/libc.so.6
#2  0x000000000047eafb in sighandler (sig=11) at gtkmain.c:208
#3  <signal handler called>
#4  silc_fsm_event_wait (event=0xffd758, fsm=0xff79e0) at silcfsm.c:556
#5  0x00002ba08511a1dc in silc_client_st_run (fsm=0xff79e0, 
    fsm_context=<value optimized out>, state_context=0x0) at client.c:514
#6  0x00002ba084e760e2 in silc_fsm_run (schedule=<value optimized out>, 
    app_context=<value optimized out>, type=<value optimized out>, fd=0,
context=0xff79e0)
    at silcfsm.c:429
#7  0x00002ba084e765d4 in silc_fsm_signal (schedule=<value optimized out>, 
    app_context=<value optimized out>, type=<value optimized out>, fd=<value
optimized out>, 
    context=<value optimized out>) at silcfsm.c:689
#8  0x00002ba084e733c4 in silc_schedule_dispatch_timeout (schedule=0xff90c0, 
    dispatch_all=0 '\0') at silcschedule.c:114
#9  0x00002ba084e73530 in silc_schedule_iterate (schedule=0xff90c0,
timeout_usecs=0)
    at silcschedule.c:159
#10 0x00002ba084e73801 in silc_schedule_one (schedule=0xff90c0, timeout_usecs=0)
    at silcschedule.c:484
#11 0x00002ba084c14ee4 in silcpurple_scheduler_fd (data=0xf83250, fd=7, 
    cond=PURPLE_INPUT_READ) at silc.c:161
#12 0x00000000004656f1 in pidgin_io_invoke (source=0xffd830,
condition=G_IO_IN, data=0xffd800)
    at gtkeventloop.c:77
#13 0x00002ba079caaa14 in g_main_context_dispatch () from
/usr/lib/libglib-2.0.so.0
#14 0x00002ba079cad85d in ?? () from /usr/lib/libglib-2.0.so.0
#15 0x00002ba079cadb6a in g_main_loop_run () from /usr/lib/libglib-2.0.so.0
#16 0x00002ba076f3f023 in gtk_main () from /usr/lib/libgtk-x11-2.0.so.0
#17 0x000000000047fb8d in main (argc=2, argv=0x7fff353daf48) at gtkmain.c:881

I'm not comfortable committing this patch with this crash, since it seems
pretty easy to reproduce.  Do you think you could take a look at this some time?

Also, you might want to submit future patches to
http://developer.pidgin.im/simpleticket so that we don't lose track of them.

Thanks,
Mark




More information about the Devel mailing list