[uClibc] Re: asnparser from pwlib segfaults

Andras BALI drewie at freemail.hu
Mon May 31 17:13:15 UTC 2004


 > I'm trying to compile pwlib and openh323 for use under uclibc
 > in a uclibc (cvs head) buildroot. Pwlib (cvs, tag: Janus_patch2)
 > compiles clearly (after s/strtoq/strtoll/;s/strtouq/strtoull/), but
 > the resulting `asnparser' binary produces segmentation fault.

Follow-up: the small samples provided with the pwlib source are
all working. Asnparser is also working to a certain extent, but
after having done some amount of work, it suddenly dies with a
segfault, ie. it doesn't finish the parsing process if the input is
long enough. And nevertheless, it always segfaults upon exiting,
regardless the fact whether it has run perfectly otherwise or not.
I have managed to get gnugk and openh323 (both depending on
pwlib and asnparser) to build using a static binary for asnparser
from a glibc host, but gnugk dies in the same way as asnparser.
The problem occurs both in a chroot() environment and stand-alone
systems.

Here is the backtrace:

Starting program: /usr/bin/asnparser -V
[Thread debugging using libthread_db enabled]
[New Thread 1024 (LWP 13751)]
ASNParse version 1.8.1 for Unix Linux by Equivalence

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1024 (LWP 13751)]
0x403579b8 in __pthread_unlock () from /lib/libpthread.so.0
(gdb) bt
#0  0x403579b8 in __pthread_unlock () from /lib/libpthread.so.0
#1  0x4035481d in pthread_mutex_unlock () from /lib/libpthread.so.0
#2  0x402267d3 in ~PSemaphore (this=0x8096af0) at tlibthrd.cxx:1390
#3  0x4012f8f9 in ~PSyncPoint (this=0x8096af0) at 
../../ptclib/qchannel.cxx:50
#4  0x401f6e47 in ~PSyncPointAck (this=0x8096aa8) at config.cxx:181
#5  0x401f5759 in ~PXConfigDictionary (this=0x8096a48) at config.cxx:496
#6  0x402230f0 in PProcess::CommonDestruct (this=0x80954a0) at tlib.cxx:716
#7  0x4022381d in ~PProcess (this=0x80954a0) at tlibthrd.cxx:628
#8  0x08076346 in ~App (this=0x80954a0) at main.cxx:349
#9  0x08076444 in __tcf_0 () at main.cxx:349
#10 0x40415f15 in __exit_handler () from /lib/libc.so.0
#11 0x40415f6b in exit () from /lib/libc.so.0
#12 0x403f0961 in __uClibc_start_main () from /lib/libc.so.0
[...]

Btw, uclibc cvs head doesn't compile with debug mode enabled: gcc
dies on atomicity.h with "inconsistent operand constraints" (i386), so
I have enabled only pthread debugging for this backtrace.





More information about the uClibc mailing list