[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 07/08: Fix stale stack frame clearing for frame size cha
From: |
Andy Wingo |
Subject: |
[Guile-commits] 07/08: Fix stale stack frame clearing for frame size change |
Date: |
Fri, 20 Jul 2018 05:58:56 -0400 (EDT) |
wingo pushed a commit to branch lightning
in repository guile.
commit 9b70129504954810323e1b0b6ba43eab2ff51b01
Author: Andy Wingo <address@hidden>
Date: Thu Jul 19 13:54:55 2018 +0200
Fix stale stack frame clearing for frame size change
* libguile/vm-engine.c (return-values): Clear all 3 stack slots. Not
sure this is necessary though!
---
libguile/vm-engine.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/libguile/vm-engine.c b/libguile/vm-engine.c
index 383b4f5..e099c1d 100644
--- a/libguile/vm-engine.c
+++ b/libguile/vm-engine.c
@@ -545,14 +545,15 @@ VM_NAME (scm_thread *thread)
VM_DEFINE_OP (9, return_values, "return-values", OP1 (X32))
{
union scm_vm_stack_element *old_fp;
+ size_t frame_size = 3;
old_fp = VP->fp;
ip = SCM_FRAME_VIRTUAL_RETURN_ADDRESS (VP->fp);
VP->fp = SCM_FRAME_DYNAMIC_LINK (VP->fp);
/* Clear stack frame. */
- old_fp[0].as_scm = SCM_BOOL_F;
- old_fp[1].as_scm = SCM_BOOL_F;
+ while (frame_size--)
+ old_fp[frame_size].as_scm = SCM_BOOL_F;
POP_CONTINUATION_HOOK (old_fp);
- [Guile-commits] branch lightning updated (5577392 -> 950a762), Andy Wingo, 2018/07/20
- [Guile-commits] 07/08: Fix stale stack frame clearing for frame size change,
Andy Wingo <=
- [Guile-commits] 03/08: Add support for reading ELF symbol table from C, Andy Wingo, 2018/07/20
- [Guile-commits] 05/08: Reserve frame word for machine return address, Andy Wingo, 2018/07/20
- [Guile-commits] 04/08: Prepare for frames having separate virtual and machine return addrs, Andy Wingo, 2018/07/20
- [Guile-commits] 08/08: Multiple-value returns now start from slot 0, not slot 1, Andy Wingo, 2018/07/20
- [Guile-commits] 06/08: Rework VM approach to shuffling unknown numbers of args, Andy Wingo, 2018/07/20
- [Guile-commits] 01/08: Merge 'master' into 'lightning', Andy Wingo, 2018/07/20
- [Guile-commits] 02/08: Make JIT compiler skeleton more terse, Andy Wingo, 2018/07/20