mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-20 18:50:21 +02:00
Add new test case to check stack integrity on complex stack frames.
* check/stack.ok, check/stack.tst: New files to test data integrity on a deep chain of stack frames. * lib/jit_arm.c, lib/jit_arm-cpu.c, lib/jit_mips.c, lib/jit_mips-cpu.c, lib/jit_ppc.c, lib/jit_ppc-cpu.c, lib/jit_x86.c, lib/jit_x86-cpu.c: Calculate _jit->function->stack in the emit stage, otherwise it will calculate it wrong if need to jit_allocai space to spill registers. * lib/lightning.c: Correct wrong offset when updating the "current" jit function pointer in the code that may need to allocate stack space to spill registers. * check/lightning.c: Correct off by one data space check. * check/Makefile.am: Update for new test case.
This commit is contained in:
parent
b43ea1f908
commit
a74318a1d7
14 changed files with 387 additions and 29 deletions
|
@ -3564,6 +3564,10 @@ _calli_p(jit_state_t *_jit, jit_word_t i0)
|
|||
static void
|
||||
_prolog(jit_state_t *_jit, jit_node_t *node)
|
||||
{
|
||||
_jit->function->stack = ((_jit->function->self.alen -
|
||||
/* align stack at 8 bytes */
|
||||
_jit->function->self.aoff) + 7) & -8;
|
||||
|
||||
if (jit_thumb_p()) {
|
||||
/* switch to thumb mode (better approach would be to
|
||||
* ORR 1 address being called, but no clear distinction
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue