Skip to contentSkip to conversation

gcc-3.3 vs. 3.4

parisc-linux Carlos O'Donell 4 participants 8 messages Apr 27, 2005 – Apr 29, 2005

lore
Share & tools
lore
#0 lore raw

jda,

I just ran into a case in glibc, where compiling dl-fptr.c (libc/sysdeps/generic/) with gcc-3.3 works, but gcc-3.4 doesn't. In particular I believe gcc-3.4 was incorrectly aggressive with a branch delay slot optimization and causes a load before the register is setup.

I only seem to see this case under certain compile options. To test my theory I went back and manually compiled dl-fptr.c with gcc-3.3, while the rest of glibc was compiled with gcc-3.4 and the two failures go away.

The failures are two static tests that call dlopen, which eventually uses dl_make_fptr to construct the required OPD's.

NOTE: dl_make_ftpr is actually compiled *into* the executable at this point, since it's static and all the loader code is included.

c.

_______________________________________________
parisc-linux mailing list
[email protected]
http://lists.parisc-linux.org/mailman/listinfo/parisc-linux

#1 lore raw
Quoted 2 lines · Carlos O'Donell

NOTE: dl_make_ftpr is actually compiled *into* the executable at this point, since it's static and all the loader code is included.

On second thought, I'm sure _dl_make_fptr from the dynamically loaded ld.so.1 is being used. So I'm not quite sure what distinguishes this case from any other, except that it crashes on the first call to _dl_make_fptr.

c.

_______________________________________________
parisc-linux mailing list
[email protected]
http://lists.parisc-linux.org/mailman/listinfo/parisc-linux

#2 lore raw
Quoted 8 lines · Carlos O'Donell
Quoted 2 lines

NOTE: dl_make_ftpr is actually compiled *into* the executable at this point, since it's static and all the loader code is included.

On second thought, I'm sure _dl_make_fptr from the dynamically loaded ld.so.1 is being used. So I'm not quite sure what distinguishes this case from any other, except that it crashes on the first call to _dl_make_fptr.

Do you have the macro fix installed? There is a definition that's only used in an asm that 3.4 deletes because it thinks it's not used. I believe there is a warning.

If that's not the problem, can you send the precompiled source, the compile command, and a note as to which code is miscompiled.

I probably won't be able to look at it until next week.

Dave

Signature · 6 lines
J. David Anglin                                  [email protected]
National Research Council of Canada              (613) 990-0752 (FAX: 952-6602)
_______________________________________________
parisc-linux mailing list
[email protected]
http://lists.parisc-linux.org/mailman/listinfo/parisc-linux
#3 lore raw
In reply to Carlos O'Donell
Quoted 8 lines · Carlos O'Donell
Quoted 2 lines · Carlos O'Donell

NOTE: dl_make_ftpr is actually compiled *into* the executable at this point, since it's static and all the loader code is included.

On second thought, I'm sure _dl_make_fptr from the dynamically loaded ld.so.1 is being used. So I'm not quite sure what distinguishes this case from any other, except that it crashes on the first call to _dl_make_fptr.

which basically looks like when you try to run the new ld.so it segfaults ? we've been testing just about every version of gcc-3.4 thus far on parisc and it has yet to build us a glibc w/out segfaults ;)
-mike
_______________________________________________
parisc-linux mailing list
[email protected]
http://lists.parisc-linux.org/mailman/listinfo/parisc-linux

#4 lore raw
Quoted 5 lines · Mike Frysinger
Quoted 4 lines · Carlos O'Donell
Quoted 2 lines · Carlos O'Donell

NOTE: dl_make_ftpr is actually compiled *into* the executable at this point, since it's static and all the loader code is included.

Quoted 8 lines
Quoted 4 lines

On second thought, I'm sure _dl_make_fptr from the dynamically loaded ld.so.1 is being used. So I'm not quite sure what distinguishes this case from any other, except that it crashes on the first call to _dl_make_fptr.

which basically looks like when you try to run the new ld.so it segfaults ? we've been testing just about every version of gcc-3.4 thus far on parisc and it has yet to build us a glibc w/out segfaults ;)

It builds, and runs all the testsuite, except for these two tests. Perhaps debian has gcc-3.4 patches that gentoo is missing?

c.

_______________________________________________
parisc-linux mailing list
[email protected]
http://lists.parisc-linux.org/mailman/listinfo/parisc-linux

#5 lore raw
Quoted 11 lines · Carlos O'Donell
Quoted 10 lines · Mike Frysinger
Quoted 8 lines · Carlos O'Donell
Quoted 2 lines · Carlos O'Donell

NOTE: dl_make_ftpr is actually compiled *into* the executable at this point, since it's static and all the loader code is included.

On second thought, I'm sure _dl_make_fptr from the dynamically loaded ld.so.1 is being used. So I'm not quite sure what distinguishes this case from any other, except that it crashes on the first call to _dl_make_fptr.

Quoted 6 lines
Quoted 3 lines

which basically looks like when you try to run the new ld.so it segfaults ? we've been testing just about every version of gcc-3.4 thus far on parisc and it has yet to build us a glibc w/out segfaults ;)

It builds, and runs all the testsuite, except for these two tests. Perhaps debian has gcc-3.4 patches that gentoo is missing?

perhaps ... which version of gcc/glibc are you playing with in debian ? -mike
_______________________________________________
parisc-linux mailing list [email protected]
http://lists.parisc-linux.org/mailman/listinfo/parisc-linux

#6 lore raw
Quoted 5 lines · Mike Frysinger
Quoted 2 lines

It builds, and runs all the testsuite, except for these two tests. Perhaps debian has gcc-3.4 patches that gentoo is missing?

perhaps ... which version of gcc/glibc are you playing with in debian ? -mike

Debian binutils and gcc 3.4, with glibc head + patches.

c.

_______________________________________________
parisc-linux mailing list
[email protected]
http://lists.parisc-linux.org/mailman/listinfo/parisc-linux

#7 lore raw
Quoted 8 lines · Carlos O'Donell
Quoted 5 lines · Mike Frysinger
Quoted 2 lines

It builds, and runs all the testsuite, except for these two tests. Perhaps debian has gcc-3.4 patches that gentoo is missing?

perhaps ... which version of gcc/glibc are you playing with in debian ? -mike

Debian binutils and gcc 3.4, with glibc head + patches.

$ gcc-3.4 --version
gcc-3.4 (GCC) 3.4.4 20050314 (prerelease) (Debian 3.4.3-12)
_______________________________________________
parisc-linux mailing list
[email protected]
http://lists.parisc-linux.org/mailman/listinfo/parisc-linux