On Jun 28, 2007, at 1:52 PM, Marshall Powers wrote:
(gdb) set args 1

(gdb) run

Starting program: /home/mpowers/log4cxx_smart/testptr 1



Program received signal SIGSEGV, Segmentation fault.

[Switching to Thread 1]

0x09000000000523ec in malloc_y () from /usr/lib/libc.a(shr_64.o)

(gdb) bt

#0  0x09000000000523ec in malloc_y () from /usr/lib/libc.a(shr_64.o)

#1 0x090000000004f478 in malloc_common_52_36 () from /usr/lib/ libc.a(shr_64.o)

#2 0x09000000003d499c in iconv_open (t_name=0x1002a3808 "UTF-8", f_name=0x9001000a0001108 "ISO8859-1")

    at ../../../../../../../src/bos/usr/ccs/lib/libiconv/iconv.c:431

#3 0x000000010005386c in apr_xlate_open (convset=0x1100cec58, topage=0x1002a3808 "UTF-8", frompage=0x9001000a0001108 "ISO8859-1", pool=0x1100cec98)

at /home.local/mpowers/new_log4cxx/lib/apr-util-1.2.7/xlate/ xlate.c:251

#4 0x000000010004f93c in log4cxx::helpers::APRCharsetDecoder::APRCharsetDecoder(char const*) (this=0x1100cec30, frompage=0x1 "")

    at /home.local/mpowers/new_log4cxx/src/charsetdecoder.cpp:64

#5 0x0000000100050168 in log4cxx::helpers::CharsetDecoder::createDefaultDecoder() () at / home.local/mpowers/new_log4cxx/src/charsetdecoder.cpp:460

#6 0x0000000100050260 in log4cxx::helpers::CharsetDecoder::getDefaultDecoder() () at / home.local/mpowers/new_log4cxx/src/charsetdecoder.cpp:467

#7 0x000000010004d150 in log4cxx::helpers::Transcoder::decode(char const*, unsigned long, std::string&) (src=0x1100ccbe8 "HELLO WORLD!", len=12,

[EMAIL PROTECTED]) at /home.local/mpowers/new_log4cxx/src/ transcoder.cpp:57

#8 0x00000001000bf6c4 in void log4cxx::helpers::Transcoder::decode<std::string>(std::string const&, std::string&) ([EMAIL PROTECTED],

[EMAIL PROTECTED]) at /home.local/mpowers/new_log4cxx/ include/log4cxx/helpers/transcoder.h:49

#9 0x00000001000c5ac8 in log4cxx::Logger::forcedLog (log4cxx::helpers::ObjectPtrT<log4cxx::Level> const&, std::string const&, log4cxx::spi::LocationInfo const&) (this=0x1100c4a70, [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED]) at /home.local/mpowers/new_log4cxx/src/ logger.cpp:109

#10 0x0000000100000ad8 in main (argc=2, argv=0xffffffffffffab8) at main.cpp:17







This crash seems to occur if I instantiate any object and give it to a smart pointer (*Ptr) variable. It’s not limited to RollingFileAppender. Any ideas for resolving this problem? Can anyone else reproduce this on their own AIXes? I’ve tested this code on other OSes such as HPUX, windows, solaris, and linux without trouble.







Thanks for the help,

Marshall



The stack trace does look iconv releated, but unlike Anand's, it doesn't appear that apr_xlate_open is returning null, but that iconv_open is segfaulting on a request for a ISO8859-1 to UTF-8 transcoder which would seem to be an AIX bug. The "ISO8859-1" would make it appear like the locale is properly set. I would try the following:

Run locale to see the value of LC_CTYPE, I'm assuming it is ISO8859-1
Run iconv -l to see if ISO8859-1 and UTF-8 appear in list
If ISO8859-1 is not in the iconv -l list but a slightly different form is set the LC_CTYPE environment variable with ISO-8859-1 or whatever If UTF-8 isn't but a different form is used, you could hack charsetdecoder and charsetencoder to use the other form of UTF-8. Please let the list know if this one happens. Download the current APR and APR-util and run "make check" on apr- util. I'd assume you'd get the same segfault, however now you could report it to the apr-dev mailing list where you'd be more likely to get support by someone with an AIX box and more knowledge of the platform.

Would appreciate you keeping the list advised of this one.



Reply via email to