segfault with static programs that don't use stdio functions

Rob Landley rob at landley.net
Thu Dec 11 02:10:51 UTC 2008


On Wednesday 10 December 2008 08:57:30 Tino Keitel wrote:
> Hi,
>
> as the bug tracker is down, I try it here.
>
> I discovered that all statically linked programs without stdio usage
> segfault with uclibc 0.9.29 and later. Here is the example program I
...
> I got this segfault with uclibc 0.9.29 and gcc 4.1 first. It happens on
> i386, but not on big endian ARM. Here is the procedure how I tracked
> this down with buildroot from latest git, using uclibc 0.9.30 and gcc
> 4.3.2:

I haven't seen it in 0.9.30, but then I'm using gcc 4.1 not 4.3.

The patch I used to fix it for 0.9.29 with 4.1 is attached.  (The gcc 
./configure step creates a "void main(void) {}" and compiles and runs it as a 
sanity test for the compiler, which segfaulted with stock uClibc 0.9.29 but 
works fine for me out of the box with 0.9.30.)

Rob
-------------- next part --------------
A non-text attachment was scrubbed...
Name: uClibc-static-segfaults.patch
Type: text/x-patch
Size: 3293 bytes
Desc: not available
Url : http://lists.busybox.net/pipermail/uclibc/attachments/20081210/b03758c4/attachment-0002.bin 


More information about the uClibc mailing list