Building Mozilla with pgo results in a binary that can't even start to generate profiling data. Turns out that even CXX="g++ --coverage" and CC="gcc --coverage" resulting a binary that segfaults on start. The crash looks like #0 0x00007ffff40807c1 in strlen () from /lib/libc.so.6 #1 0x00007ffff6823a92 in __gcov_init () from /tmp/xulrunner/dist/bin/libxul.so #2 0x00007ffff6824f56 in __do_global_ctors_aux () from /tmp/xulrunner/dist/bin/libxul.so #3 0x00007ffff51888ab in _init () from /tmp/xulrunner/dist/bin/libxul.so #4 0x00007fffffffe908 in ?? () #5 0x00007ffff7dee429 in ?? () from /lib64/ld-linux-x86-64.so.2 #6 0x00007ffff7dee5af in ?? () from /lib64/ld-linux-x86-64.so.2 #7 0x00007ffff7de1b2a in ?? () from /lib64/ld-linux-x86-64.so.2 #8 0x0000000000000001 in ?? () #9 0x00007fffffffeb8c in ?? () #10 0x0000000000000000 in ?? () Looks like the info parameter passed to __gcov_init is buggered. This broken in gcc 4.4-trunk, didn't test on prior releases.
Do you have a small testcase?
(In reply to comment #1) > Do you have a small testcase? > I wish. A minimal testcase works, but mozilla doesn't. Any suggestions on how to reduce this?
I have Fedora 12 and Fedora 13. Is there a way to reproduce it with only executable and leave libraries alone?
(In reply to comment #3) > I have Fedora 12 and Fedora 13. Is there a way to reproduce it with only > executable and leave libraries alone? > I'm not sure what you mean.
(In reply to comment #4) > (In reply to comment #3) > > I have Fedora 12 and Fedora 13. Is there a way to reproduce it with only > > executable and leave libraries alone? > > > > I'm not sure what you mean. > Fedora comes with Firefox. If I recompile /usr/lib64/firefox-3.5/firefox with --coverage, will I see the problem?
(In reply to comment #5) > (In reply to comment #4) > > (In reply to comment #3) > > > I have Fedora 12 and Fedora 13. Is there a way to reproduce it with only > > > executable and leave libraries alone? > > > > > > > I'm not sure what you mean. > > > > Fedora comes with Firefox. If I recompile /usr/lib64/firefox-3.5/firefox > with --coverage, will I see the problem? > I presume you'd recompile the whole firefox rpm. I think you should be able to reproduce the problem there.
*** This bug has been marked as a duplicate of 43341 ***
Taras, to avoid triggering the problem from firefox you can search for the file (as I remember there is only one in xulrunner) with #pragma pack(1) and does not reset it, and add #pragma pack() in the end of that file.
(In reply to comment #8) > Taras, to avoid triggering the problem from firefox you can search for the file > (as I remember there is only one in xulrunner) with #pragma pack(1) and does > not reset it, and add #pragma pack() in the end of that file. > This wouldn't have even crossed my mind. Works great, thanks for debugging this.