Bug#447535: centerim-utf8: Segfaults instead of connecting to Yahoo!
Hi. Thank you very much. The patch was apply in the centerim's git repository [1] I will do a new release on Debian soon. Regards. [1] http://repo.or.cz/w/centerim.git?a=shortlog;h=mob On 10/26/07, Chris Donoghue [EMAIL PROTECTED] wrote: Perhaps this is fine on i386 version and not amd64. I had the following backtrace on amd64: Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x2b2488ece270 (LWP 10505)] 0x2b248748f4f0 in strcmp () from /lib/libc.so.6 (gdb) backtrace #0 0x2b248748f4f0 in strcmp () from /lib/libc.so.6 #1 0x00671ee4 in _yahoo_assign_server_settings (ap=0x7fff26115a00) at libyahoo2.c:296 #2 0x0067b097 in yahoo_init_with_attributes ( username=0xb47c88 , password=0xb48188 ) at libyahoo2.c:3408 #3 0x0052e262 in yahoohook::connect (this=0x98a100) at yahoohook.cc:148 #4 0x0052c40d in yahoohook::setautostatus (this=0x98a100, st=available) at yahoohook.cc:455 #5 0x00514df2 in abstracthook::setstatus (this=0x98a100, st=available) at abstracthook.cc:75 #6 0x00412d51 in centerim::changestatus (this=0x9876e0) at centerim.cc:476 #7 0x004132c1 in centerim::mainloop (this=0x9876e0) at centerim.cc:191 #8 0x00415bf6 in centerim::exec (this=0x9876e0) at centerim.cc:106 #9 0x004b1f84 in main (argc=3, argv=0x7fff261172c8) at centermain.cc:61 (gdb) The check on key variable is for NULL to indicate the end of the va_list as passed a few calls back. It seems the NULL isn't coming through as a NULL. According to the man page: If there is no next argument, or if type is not compatible with the type of the actual next argument (as promoted according to the default argument promotions), random errors will occur. On line 3416 of libyahoo2/libyahoo.c file return yahoo_init_with_attributes(username, password, NULL); Probably this NULL doesn't come through as an expected char * type in _yahoo_assign_server_settings function. I believe that when NULL is passed it is thought of as an int but we want a char * in later calls. This would explain an amd64 error and not a i386 one if such was the case. Also, this error was never there before but is now. I think this might be becuase GCC is now version 4.2.2 whereas previously compiled versions of centerim was with 4.2.1. (So va_arg handling has changed in the newer gcc 4.2.2?) To fix I simply replace that line return yahoo_init_with_attributes(username, password, (char *) NULL); Similarly in the file src/hooks/yahoohook.cc on line 146 cid = yahoo_init_with_attributes(acc.nickname.c_str(), acc.password.c_str(), pager_host, acc.server.c_str(), pager_port, acc.port, NULL); Should be cid = yahoo_init_with_attributes(acc.nickname.c_str(), acc.password.c_str(), pager_host, acc.server.c_str(), pager_port, acc.port, (char *) NULL); I've attached patches. It all built fine here and works without crashes for me now. A good Friday night spent at the computer. :) Also perhaps this needs to be changed in the libyahoo2 sources also (and upstream? if that could be forwarded on) Thanks Chris Donoghue -- Anibal Avelar (FixXxeR) http://fixxxer.cc GPG: 83B64656 - C143 4AD8 B017 53FA B742 D6AA CEEA F9F3 83B6 4656 -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Bug#447535: centerim-utf8: Segfaults instead of connecting to Yahoo!
Perhaps this is fine on i386 version and not amd64. I had the following backtrace on amd64: Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x2b2488ece270 (LWP 10505)] 0x2b248748f4f0 in strcmp () from /lib/libc.so.6 (gdb) backtrace #0 0x2b248748f4f0 in strcmp () from /lib/libc.so.6 #1 0x00671ee4 in _yahoo_assign_server_settings (ap=0x7fff26115a00) at libyahoo2.c:296 #2 0x0067b097 in yahoo_init_with_attributes ( username=0xb47c88 , password=0xb48188 ) at libyahoo2.c:3408 #3 0x0052e262 in yahoohook::connect (this=0x98a100) at yahoohook.cc:148 #4 0x0052c40d in yahoohook::setautostatus (this=0x98a100, st=available) at yahoohook.cc:455 #5 0x00514df2 in abstracthook::setstatus (this=0x98a100, st=available) at abstracthook.cc:75 #6 0x00412d51 in centerim::changestatus (this=0x9876e0) at centerim.cc:476 #7 0x004132c1 in centerim::mainloop (this=0x9876e0) at centerim.cc:191 #8 0x00415bf6 in centerim::exec (this=0x9876e0) at centerim.cc:106 #9 0x004b1f84 in main (argc=3, argv=0x7fff261172c8) at centermain.cc:61 (gdb) The check on key variable is for NULL to indicate the end of the va_list as passed a few calls back. It seems the NULL isn't coming through as a NULL. According to the man page: If there is no next argument, or if type is not compatible with the type of the actual next argument (as promoted according to the default argument promotions), random errors will occur. On line 3416 of libyahoo2/libyahoo.c file return yahoo_init_with_attributes(username, password, NULL); Probably this NULL doesn't come through as an expected char * type in _yahoo_assign_server_settings function. I believe that when NULL is passed it is thought of as an int but we want a char * in later calls. This would explain an amd64 error and not a i386 one if such was the case. Also, this error was never there before but is now. I think this might be becuase GCC is now version 4.2.2 whereas previously compiled versions of centerim was with 4.2.1. (So va_arg handling has changed in the newer gcc 4.2.2?) To fix I simply replace that line return yahoo_init_with_attributes(username, password, (char *) NULL); Similarly in the file src/hooks/yahoohook.cc on line 146 cid = yahoo_init_with_attributes(acc.nickname.c_str(), acc.password.c_str(), pager_host, acc.server.c_str(), pager_port, acc.port, NULL); Should be cid = yahoo_init_with_attributes(acc.nickname.c_str(), acc.password.c_str(), pager_host, acc.server.c_str(), pager_port, acc.port, (char *) NULL); I've attached patches. It all built fine here and works without crashes for me now. A good Friday night spent at the computer. :) Also perhaps this needs to be changed in the libyahoo2 sources also (and upstream? if that could be forwarded on) Thanks Chris Donoghue diff -Naur centerim-4.22.1.old/libyahoo2/libyahoo2.c centerim-4.22.1/libyahoo2/libyahoo2.c --- centerim-4.22.1.old/libyahoo2/libyahoo2.c 2007-10-04 07:42:12.0 +1000 +++ centerim-4.22.1/libyahoo2/libyahoo2.c 2007-10-26 21:20:52.832436381 +1000 @@ -3413,7 +3413,7 @@ int yahoo_init(const char *username, const char *password) { - return yahoo_init_with_attributes(username, password, NULL); + return yahoo_init_with_attributes(username, password, (char *) NULL); } struct connect_callback_data { diff -Naur centerim-4.22.1.old/src/hooks/yahoohook.cc centerim-4.22.1/src/hooks/yahoohook.cc --- centerim-4.22.1.old/src/hooks/yahoohook.cc 2007-10-04 07:42:12.0 +1000 +++ centerim-4.22.1/src/hooks/yahoohook.cc 2007-10-26 21:20:31.588836054 +1000 @@ -145,7 +145,7 @@ cid = yahoo_init_with_attributes(acc.nickname.c_str(), acc.password.c_str(), pager_host, acc.server.c_str(), - pager_port, acc.port, 0); + pager_port, acc.port, (char *) NULL); yahoo_login(cid, stat2int[manualstatus]);
Bug#447535: centerim-utf8: Segfaults instead of connecting to Yahoo!.
Hi. Adam, I saw you use AMD64, don't you? I had the solution (comming from other user). I will patch the centerim git repository and will update centerim soon. It's an exclusive problem for arch AMd64. I almost sure is the same problem. Regards. On 10/23/07, Adam C. Emerson [EMAIL PROTECTED] wrote: On Mon, Oct 22, 2007 at 11:55:36PM -0500, Anibal Avelar wrote: Hi. Please, you run centerim so: centerim -d Try to do the same to produce the segfaults. After you send me the .centerim/debug file. This is a log file comming from centerim with the option '-d'. Thank you. Regards. It's not a very good log: -- centerim debug log started on Tue Oct 23 00:59:53 2007 + [yahoo] connecting to the server -- Anibal Avelar (FixXxeR) http://fixxxer.cc GPG: 83B64656 - C143 4AD8 B017 53FA B742 D6AA CEEA F9F3 83B6 4656 -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Bug#447535: centerim-utf8: Segfaults instead of connecting to Yahoo!.
Hi. Please, you run centerim so: centerim -d Try to do the same to produce the segfaults. After you send me the .centerim/debug file. This is a log file comming from centerim with the option '-d'. Thank you. Regards. On 10/21/07, Adam C. Emerson [EMAIL PROTECTED] wrote: Package: centerim-utf8 Version: 4.22.1.20071003-1 Severity: normal The newest update to centerim segfaults instantly when told to connect to Yahoo!. My username contains an underscore, if that sheds any light on the matter. -- System Information: Debian Release: lenny/sid APT prefers unstable APT policy: (500, 'unstable') Architecture: amd64 (x86_64) Kernel: Linux 2.6.22-2-amd64 (SMP w/1 CPU core) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/bash Versions of packages centerim-utf8 depends on: ii centerim-common 4.22.1.20071003-1 A text-mode multi-protocol instant ii libc6 2.6.1-6GNU C Library: Shared libraries ii libcurl3-gnutls 7.17.0-1 Multi-protocol file transfer libra ii libgcc1 1:4.2.2-3 GCC support library ii libgcrypt11 1.2.4-2LGPL Crypto library - runtime libr ii libgnutls13 2.0.1-1the GNU TLS library - runtime libr ii libgpg-error0 1.4-2 library for common error values an ii libgpgme111.1.5-2GPGME - GnuPG Made Easy ii libidn11 1.1-1 GNU libidn library, implementation ii libkrb53 1.6.dfsg.3~beta1-2 MIT Kerberos runtime libraries ii libldap2 2.1.30.dfsg-13.5 OpenLDAP libraries ii liblzo2-2 2.02-3 data compression library ii libncursesw5 5.6+20071013-1 Shared libraries for terminal hand ii libopencdk10 0.6.4-1Open Crypto Development Kit (OpenC ii libstdc++64.2.2-3The GNU Standard C++ Library v3 ii libtasn1-30.3.10-1 Manage ASN.1 structures (runtime) ii zlib1g1:1.2.3.3.dfsg-6 compression library - runtime Versions of packages centerim-utf8 recommends: ii sox 14.0.0-4 Swiss army knife of sound processi ii w3m [www-browser] 0.5.1-5.1+b1 WWW browsable pager with excellent -- no debconf information -- Anibal Avelar (FixXxeR) http://fixxxer.cc GPG: 83B64656 - C143 4AD8 B017 53FA B742 D6AA CEEA F9F3 83B6 4656 -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Bug#447535: centerim-utf8: Segfaults instead of connecting to Yahoo!.
On Mon, Oct 22, 2007 at 11:55:36PM -0500, Anibal Avelar wrote: Hi. Please, you run centerim so: centerim -d Try to do the same to produce the segfaults. After you send me the .centerim/debug file. This is a log file comming from centerim with the option '-d'. Thank you. Regards. It's not a very good log: -- centerim debug log started on Tue Oct 23 00:59:53 2007 + [yahoo] connecting to the server -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Bug#447535: centerim-utf8: Segfaults instead of connecting to Yahoo!.
Package: centerim-utf8 Version: 4.22.1.20071003-1 Severity: normal The newest update to centerim segfaults instantly when told to connect to Yahoo!. My username contains an underscore, if that sheds any light on the matter. -- System Information: Debian Release: lenny/sid APT prefers unstable APT policy: (500, 'unstable') Architecture: amd64 (x86_64) Kernel: Linux 2.6.22-2-amd64 (SMP w/1 CPU core) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/bash Versions of packages centerim-utf8 depends on: ii centerim-common 4.22.1.20071003-1 A text-mode multi-protocol instant ii libc6 2.6.1-6GNU C Library: Shared libraries ii libcurl3-gnutls 7.17.0-1 Multi-protocol file transfer libra ii libgcc1 1:4.2.2-3 GCC support library ii libgcrypt11 1.2.4-2LGPL Crypto library - runtime libr ii libgnutls13 2.0.1-1the GNU TLS library - runtime libr ii libgpg-error0 1.4-2 library for common error values an ii libgpgme111.1.5-2GPGME - GnuPG Made Easy ii libidn11 1.1-1 GNU libidn library, implementation ii libkrb53 1.6.dfsg.3~beta1-2 MIT Kerberos runtime libraries ii libldap2 2.1.30.dfsg-13.5 OpenLDAP libraries ii liblzo2-2 2.02-3 data compression library ii libncursesw5 5.6+20071013-1 Shared libraries for terminal hand ii libopencdk10 0.6.4-1Open Crypto Development Kit (OpenC ii libstdc++64.2.2-3The GNU Standard C++ Library v3 ii libtasn1-30.3.10-1 Manage ASN.1 structures (runtime) ii zlib1g1:1.2.3.3.dfsg-6 compression library - runtime Versions of packages centerim-utf8 recommends: ii sox 14.0.0-4 Swiss army knife of sound processi ii w3m [www-browser] 0.5.1-5.1+b1 WWW browsable pager with excellent -- no debconf information -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]