Description of problem: I built my program, static, with the new gcc-4.4 from rawhide amd the program crash when calling exit(). I have installed the fedora 11alpha from rawhide today. Version-Release number of selected component (if applicable): gcc version 4.4.0 20090206 (Red Hat 4.4.0-0.16) (GCC) How reproducible: each time Steps to Reproduce: 1. download binary http://www.math.ntnu.no/~hrue/hfiles/gcc.fail 2. run it 3. it seg.fault Actual results: seg.fault Expected results: run as normal Additional info: it does not happen without the -static. Here is the binary, where the main program just call exit(0) after starting, http://www.math.ntnu.no/~hrue/hfiles/gcc.fail my rpms: http://www.math.ntnu.no/~hrue/hfiles/rpms Curiously, the seg.fault is also picked up by the kernel localhost[~]$ ~/www/www.imf/hfiles/gcc.fail Segmentation fault (core dumped) localhost[~]$ tail -n1 /var/log/messages Feb 11 22:44:30 localhost kernel: gcc.fail[15804]: segfault at 0 ip (null) sp 00007ffff4d55268 error 14 in gcc.fail[400000+9df000]
Please provide the source you are compiling and the options used, binary is unsufficient.
Created attachment 331696 [details] The script to run the testcase The script to run the test case, like: localhost[tmp]$ sh ./makeme This is a() with i = 0 DYNAMIC OK:: FLAGS = -g This is a() with i = 0 STATIC OK:: FLAGS = -g This is a() with i = 0 DYNAMIC OK:: FLAGS = -g -fopenmp This is a() with i = 0 ./makeme: line 3: 32317 Segmentation fault (core dumped) ./a.out $arg STATIC FAIL:: FLAGS = -g -fopenmp
Created attachment 331697 [details] The C-file for the test-case
Created attachment 331698 [details] The fortranfile for the test-case
The test-case above seems to fail in the same way and produce for me similar line the /var/log/messages Feb 12 16:07:45 localhost kernel: a.out[32675]: segfault at 0 ip (null) sp 00007fffe0c4f208 error 14 in a.out[400000+ca000]
Ah, -static with OpenMP or generally with threaded programs, don't do that or force linking whole -lpthread: -Wl,--whole-archive -lpthread -Wl,--no-whole-archive Does that fix it?
Yes, that fix it ;-)