zephyr-im / zephyr

An institutional/enterprise-scale distributed real-time messaging and notification system
35 stars 11 forks source link

zwrite crash (invalid free) if zephyr servers are down #68

Closed andersk-auto closed 10 years ago

andersk-auto commented 10 years ago

The Athena realm zephyr servers, I think, are currently down. zwrite crashes with the following backtrace on a machine with zephyr-clients 3.0-1 installed: {{{ contents-vnder-pressvre:~ geofft$ zwrite -c geofft -i test Type your message now. End with control-D or a dot on a line by itself. ... ... ... ... test? . Message queued for class "geofft", instance "test"... * glibc detected ** zwrite: free(): invalid pointer: 0x00007fff50ed9978 ======= Backtrace: ========= /lib/libc.so.6(+0x775b6)[0x7f2334ce75b6] /lib/libc.so.6(cfree+0x73)[0x7f2334cede53] /usr/lib/libzephyr.so.4(ZFreeNotice+0xc)[0x7f23351fb9dc] zwrite[0x40168b] zwrite[0x4024b5] /lib/libc.so.6(__libc_start_main+0xfd)[0x7f2334c8ec4d] zwrite[0x401109] }}} 0x40168b in zwrite is the return from ZFreeNotice at [source:/trunk/zephyr/clients/zwrite/zwrite.c@2522#L397 zwrite.c:397]. It looks to me like that call is invalid and should be removed, since if [source:/trunk/zephyr/lib/ZIfNotice.c ZIfNotice] failed, then &retnotice probably wasn't initialized and so calling [source:/trunk/zephyr/lib/ZFreeNot.c ZFreeNotice] will probably attempt to free a pointer that was never initialized.

andersk-auto commented 10 years ago

Imported from trac issue 68. Created by geofft@ATHENA.MIT.EDU on 2010-06-26T03:22:13, last modified: 2011-02-21T13:18:42

andersk-auto commented 10 years ago

Trac comment by kcr@ATHENA.MIT.EDU on 2011-02-21 13:18:28:

Fixed in [2589]