This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/8743] receiving result from __builtin_return_address() beyond stack top causes segfault
- From: "gcc at kalvdans dot no-ip.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 18 Jun 2012 19:34:23 +0000
- Subject: [Bug middle-end/8743] receiving result from __builtin_return_address() beyond stack top causes segfault
- Auto-submitted: auto-generated
- References: <bug-8743-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=8743
Christian HÃggstrÃm <gcc at kalvdans dot no-ip.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |gcc at kalvdans dot
| |no-ip.org
--- Comment #10 from Christian HÃggstrÃm <gcc at kalvdans dot no-ip.org> 2012-06-18 19:34:23 UTC ---
I guess this bug can be closed now, my gcc 4.7 documentation states:
-- Built-in Function: void * __builtin_return_address (unsigned int LEVEL)
[...]
On some machines it may be impossible to determine the return
address of any function other than the current one; in such cases,
or when the top of the stack has been reached, this function will
return `0' or a random value.
[...]
This function should only be used with a nonzero argument for
debugging purposes.