Port-macppc archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: macppc __builtin_return_address crash in ld.elf_so on Xorg



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,

On Jun 15, 2008, at 11:31, Peter Bex wrote:
On Sun, Jun 15, 2008 at 01:49:43PM +0000, Valeriy E. Ushakov wrote:
Peter Bex <Peter.Bex%xs4all.nl@localhost> wrote:

Where is __builtin_return_address implemented? I tried grepping
src/gnu but I couldn't find a definition place.

src/gnu/dist/gcc4/gcc/builtins.c (expand_builtin_return_addr)

Another point of interest:
When I run a rebuilt nonoptimized modular-xorg-server (CFLAGS=-O0), the server crashes later in the process. The screen actually goes black for
a second and I see it switching resolutions. It also prints
"xf86OpenConsole", followed by "RADEON(0): RADEONPreInit" and then the
familiar segfault handling line.

Trying to run gdb on it results in nothing useful, as the machine
becomes unusable while in gdb, probably because the segfault handler
isn't invoked to reset the display to a usable state.

When looking at the code, I also noticed some interesting code in
src/gnu/dist/gcc4/gcc/config/rs6000/rs6000.c:13282 (rs6000_return_addr) When you look at the code in builtins.c, you see that eventually it will
drop through to this function (the code that calls RETURN_ADDR_RTX).
When the 'if' branch is not taken, the link register is simply read out directly. Perhaps optimizations are messing up the link register, and -O0
is preventing it from doing that.

Or something got confused about what's inlined and what isn't?

have fun
Michael

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (Darwin)

iQEVAwUBSFU68cpnzkX8Yg2nAQK6ugf+J4ZR5RZ+6qTcwbbft4JJo4j/N3kEzJs+
oYNuFDm219P7POeoGEUcfUr715cVrGvvq8DAWzhYpR58VXajryow2U6JTQLQR2KA
h2E2sKA2lpNLg3cJ6lQ34FErafuz2tG3j2oLJzGvgvh/a6TrerBaarLAUW1gYjtl
HiqBRoWxLXw7H9NSAWz+sT6wvL6x1/3a6JhhWjjtv0fuIMz39DK4N3N72LnifT5M
f7nP7cGa7zNh1hXH38sGDDM8dMoFwnof4PtqCfgffKm8XxFkJmTgbKyixDJLTVcd
+7dfWrXdB9q0uftGXK4XRdDsT0ZhZBJOE1paBF43AXnmAdcdqwCWnw==
=+kvR
-----END PGP SIGNATURE-----


Home | Main Index | Thread Index | Old Index