public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c/8743: receiving result from __builtin_return_address() beyond stack top causes segfault
@ 2002-12-04 14:00 bangerth
0 siblings, 0 replies; 2+ messages in thread
From: bangerth @ 2002-12-04 14:00 UTC (permalink / raw)
To: biere, eddy, gcc-bugs, gcc-prs, nobody, steven.robbins
Synopsis: receiving result from __builtin_return_address() beyond stack top causes segfault
State-Changed-From-To: open->analyzed
State-Changed-By: bangerth
State-Changed-When: Wed Dec 4 14:00:45 2002
State-Changed-Why:
Despite the given workaround, the function is not doing what
the documentation says. This is an error.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=8743
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: c/8743: receiving result from __builtin_return_address() beyond stack top causes segfault
@ 2002-12-05 2:06 Edward Welbourne
0 siblings, 0 replies; 2+ messages in thread
From: Edward Welbourne @ 2002-12-05 2:06 UTC (permalink / raw)
To: nobody; +Cc: gcc-prs
The following reply was made to PR c/8743; it has been noted by GNATS.
From: Edward Welbourne <eddy@opera.no>
To: bangerth@dealii.org, gcc-gnats@gcc.gnu.org
Cc: biere@inf.ethz.ch, gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org,
nobody@gcc.gnu.org, steven.robbins@videotron.ca
Subject: Re: c/8743: receiving result from __builtin_return_address() beyond stack top causes segfault
Date: Thu, 05 Dec 2002 11:04:34 +0100
Also: note that the work-around only fixes the problem for the *first*
LEVEL at which it would otherwise seg-fault (which *is* just enough to
enable backtracing in ccmalloc); it does nothing about the segfault at
greater depth, which also happens in __builtin_frame_address(); if you
use __builtin_frame_address(3) in place of __builtin_return_address(2)
in the example code, you'll get a segfault just the same (on x86).
[All of which rather hints that these functions do a zig-zag chain of
pointer dereferences, which is missing an `are we zero yet' test.
I naively imagine this will be easy to fix.]
I've now had the opportunity to test the same on a ppc:
__builtin_return_address(2) segfaults, as does
__builtin_frame_address(4), but
__builtin_frame_address(3) actually succeeds !
This is with a 2.95.? version and with 3.2.1.
Eddy.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2002-12-05 10:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-12-04 14:00 c/8743: receiving result from __builtin_return_address() beyond stack top causes segfault bangerth
2002-12-05 2:06 Edward Welbourne
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).