mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-04-30 11:50:28 +02:00
c stack overflow checked for, once more
* libguile/stackchk.h: Include private-options.h if we are building guile. * libguile/vm.c (scm_c_vm_run): Check for C stack overflow before entering the engine.
This commit is contained in:
parent
138bf22d82
commit
b95d76fcf2
2 changed files with 2 additions and 0 deletions
|
@ -35,6 +35,7 @@
|
||||||
#define SCM_STACK_CHECKING_P SCM_STACK_LIMIT
|
#define SCM_STACK_CHECKING_P SCM_STACK_LIMIT
|
||||||
|
|
||||||
#if defined BUILDING_LIBGUILE && defined STACK_CHECKING
|
#if defined BUILDING_LIBGUILE && defined STACK_CHECKING
|
||||||
|
#include "libguile/private-options.h"
|
||||||
# if SCM_STACK_GROWS_UP
|
# if SCM_STACK_GROWS_UP
|
||||||
# define SCM_STACK_OVERFLOW_P(s)\
|
# define SCM_STACK_OVERFLOW_P(s)\
|
||||||
((SCM_STACK_PTR (s) - SCM_I_CURRENT_THREAD->base) > SCM_STACK_LIMIT)
|
((SCM_STACK_PTR (s) - SCM_I_CURRENT_THREAD->base) > SCM_STACK_LIMIT)
|
||||||
|
|
|
@ -560,6 +560,7 @@ SCM
|
||||||
scm_c_vm_run (SCM vm, SCM program, SCM *argv, int nargs)
|
scm_c_vm_run (SCM vm, SCM program, SCM *argv, int nargs)
|
||||||
{
|
{
|
||||||
struct scm_vm *vp = SCM_VM_DATA (vm);
|
struct scm_vm *vp = SCM_VM_DATA (vm);
|
||||||
|
SCM_CHECK_STACK;
|
||||||
return vm_engines[vp->engine](vm, program, argv, nargs);
|
return vm_engines[vp->engine](vm, program, argv, nargs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue