[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 01/10: Fix write beyond stack boundary in vm-engine.c
From: |
Andy Wingo |
Subject: |
[Guile-commits] 01/10: Fix write beyond stack boundary in vm-engine.c |
Date: |
Thu, 04 Jun 2015 22:57:48 +0000 |
wingo pushed a commit to branch master
in repository guile.
commit bb051f2154da5c479fcaed139090a859a66fde6b
Author: Andy Wingo <address@hidden>
Date: Fri Jun 5 00:10:08 2015 +0200
Fix write beyond stack boundary in vm-engine.c
* libguile/vm-engine.c (RETURN_ONE_VALUE, RETURN_VALUE_LIST): These
helpers, used in subr-call and the like, might not actually have
enough space to push the return values. Use ALLOC_FRAME instead of
RESET_FRAME, for that reason.
---
libguile/vm-engine.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/libguile/vm-engine.c b/libguile/vm-engine.c
index ec112b2..7e752dd 100644
--- a/libguile/vm-engine.c
+++ b/libguile/vm-engine.c
@@ -259,6 +259,7 @@
SCM val = ret; \
SCM *old_fp; \
VM_HANDLE_INTERRUPTS; \
+ ALLOC_FRAME (2); \
old_fp = fp; \
ip = SCM_FRAME_RETURN_ADDRESS (fp); \
fp = vp->fp = SCM_FRAME_DYNAMIC_LINK (fp); \
@@ -278,10 +279,10 @@
do { \
SCM vals = vals_; \
VM_HANDLE_INTERRUPTS; \
+ ALLOC_FRAME (3); \
fp[0] = vm_builtin_apply; \
fp[1] = vm_builtin_values; \
fp[2] = vals; \
- RESET_FRAME (3); \
ip = (scm_t_uint32 *) vm_builtin_apply_code; \
goto op_tail_apply; \
} while (0)
- [Guile-commits] branch master updated (f541ee1 -> 6f4487f), Andy Wingo, 2015/06/04
- [Guile-commits] 01/10: Fix write beyond stack boundary in vm-engine.c,
Andy Wingo <=
- [Guile-commits] 02/10: Fix slot allocation hinting for intervening terms that define dead values, Andy Wingo, 2015/06/04
- [Guile-commits] 03/10: Fix intmap-ref bug, Andy Wingo, 2015/06/04
- [Guile-commits] 04/10: Fix eta reduction on CPS2, Andy Wingo, 2015/06/04
- [Guile-commits] 05/10: Port self-references pass to CPS2, Andy Wingo, 2015/06/04
- [Guile-commits] 09/10: Enable all CPS2 optimization passes, Andy Wingo, 2015/06/04
- [Guile-commits] 06/10: Refactor renumber.scm, Andy Wingo, 2015/06/04
- [Guile-commits] 08/10: Tweaks to bootstrap build order, Andy Wingo, 2015/06/04
- [Guile-commits] 10/10: Disable CPS optimization passes, Andy Wingo, 2015/06/04
- [Guile-commits] 07/10: Add CPS2 verification pass, Andy Wingo, 2015/06/04