nmlorg / naim

naim is a console client for AOL Instant Messenger (AIM), AOL I Seek You (ICQ), Internet Relay Chat (IRC), and The lily CMC.
http://naim.n.ml.org/
1 stars 0 forks source link

toc2.c: 1614: toc_got_data: Assertion '*info == -2 ' failed. #20

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
> What steps will reproduce the problem?

Log in to icq, and be idle for some time

> What is the expected output? What do you see instead?

ErrorMessage: toc2.c: 1614: toc_got_data: Assertion '*info == -2' failed.
Aborted

> What version of naim are you using? On what operating system?
> % naim --version
0.11.8.3.1

> % uname -a
Linux dbox 2.4.36.6-dbox2 #1 Fr 17. Okt 05:15:46 CEST 2008 ppc unknown

> Please provide any additional information below.
I'm using naim on a dbox2. It is self compiled with
uclibc-0.9.28.3
ncurses-5.3
gcc-core-3.4.6
gcc-g++-3.4.6

The following configure options have been used:

./configure --build=x86_64-unknown-linux-gnu
--host=powerpc-tuxbox-linux-uclibc --prefix=

Naim seems to work fine, but suddenly it crashes with the error message
mentioned above.

Original issue reported on code.google.com by th.schel...@gmail.com on 19 Oct 2008 at 10:31

GoogleCodeExporter commented 9 years ago
This is a known problem with whatever ppc compiler you are using.  

Try changing line 1614 of toc2.c from
 assert(*info == -2);
to:
 assert(*info == -2 || *info == 254);

And:

1623:           assert((info[0] == -2 || info[0] == 254) || (info[0] == '<') ||
((info[0] == 0) && (info[1] == '<')));
and
1629:           assert(*third == -2 || *third == 254);

(int8_t)-2 *is* (uint8_t)254 (both are 0xFE). Looks like it's promoting an 
unsigned
char to a signed int for the comparison (comparing 0x000000FE to 0xFFFFFFFE).

Original comment by eminence@gmail.com on 21 Jan 2009 at 10:02