Adding debug symbols causes segmentation faults with GCC-4.1 and MIPS...

Nicholas Nethercote njn@cs.utexas.edu
Tue Sep 13 22:04:00 GMT 2005


On Tue, 13 Sep 2005, Steven J. Hill wrote:

>> You might want to first make sure that your program has no memory
>> access errors.  You could try building it for x86 and debugging
>> with valgrind, to see if that catches anything.
>> 
> A good idea. I built it for x86. Unfortunately, from the output it
> appears that 'clone' is not supported, or rather not very well. Here
> is a link to the source:
>
> http://www.uclibc.org/cgi-bin/viewcvs.cgi/*checkout*/trunk/uClibc/test/unistd/clone.c?content-type=text%2Fplain&rev=10696
>
> The only interesting output is:
>
> ==4032== Syscall param clone(parent_tidptr) contains uninitialised byte(s)
> ==4032==    at 0x1BA108AC: clone (clone.S:100)
> ==4032==    by 0x1B96C412: __libc_start_main (libc-start.c:250)
> ==4032==    by 0x80484A0: ??? (start.S:119)
> ==4032==
> ==4032== Syscall param clone(tlsinfo) contains uninitialised byte(s)
> ==4032==    at 0x1BA108AC: clone (clone.S:100)
> ==4032==    by 0x1B96C412: __libc_start_main (libc-start.c:250)
> ==4032==    by 0x80484A0: ??? (start.S:119)
> ==4032==
> ==4032== Syscall param clone(child_tidptr) contains uninitialised byte(s)
> ==4032==    at 0x1BA108AC: clone (clone.S:100)
> ==4032==    by 0x1B96C412: __libc_start_main (libc-start.c:250)
> ==4032==    by 0x80484A0: ??? (start.S:119)
> ==4032==
> ==4032== Unsupported clone() flags: 0x0
> ==4032==
> ==4032== The only supported clone() uses are:
> ==4032==  - via a threads library (LinuxThreads or NPTL)
> ==4032==  - via the implementation of fork or vfork
> ==4032==  - for the Quadrics Elan3 user-space driver
>
> I don't feel like I can trust the output since valgrind admitted it does
> not do clone very well.

It handles the most common invocations of clone, but this program passes 
in 0 for 'flags', which seems odd.

Nick



More information about the Gcc mailing list