This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/23774] dealloc of dynamic stack space breaks backchain
- From: "amodra at bigpond dot net dot au" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 13 Sep 2005 00:33:51 -0000
- Subject: [Bug target/23774] dealloc of dynamic stack space breaks backchain
- References: <20050908005521.23774.amodra@bigpond.net.au>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From amodra at bigpond dot net dot au 2005-09-13 00:33 -------
The same thing happens with __builtin_longjmp, eg. extracted from
gcc.c-torture/execute/builtins/lib/chk.c
void __attribute__((noreturn))
__chk_fail (void)
{
if (chk_fail_allowed)
__builtin_longjmp (chk_fail_buf, 1);
abort ();
}
generates
__chk_fail:
stwu 1,-16(1)
mflr 0
stw 31,12(1)
stw 0,20(1)
mr 31,1
lis 9,chk_fail_allowed@ha
lwz 0,chk_fail_allowed@l(9)
cmpwi 7,0,0
beq- 7,.L133
lis 11,chk_fail_buf@ha
la 9,chk_fail_buf@l(11)
lwz 0,4(9)
mtctr 0
lwz 31,chk_fail_buf@l(11)
lwz 0,8(9)
lwz 1,12(9) <- stack adjusted
stw 0,0(1) <- backchain written
bctr
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23774