fix another bytecode-validation bug found by Casey
This commit is contained in:
parent
e8ef7dcaa5
commit
439ef9bffb
|
@ -12566,12 +12566,12 @@ void scheme_validate_toplevel(Scheme_Object *expr, Mz_CPort *port,
|
|||
make_clearing_stack(), 0, 0);
|
||||
}
|
||||
|
||||
void scheme_validate_boxenv(int p, Mz_CPort *port, char *stack, int depth, int delta)
|
||||
void scheme_validate_boxenv(int p, Mz_CPort *port, char *stack, int depth, int delta, int letlimit)
|
||||
{
|
||||
if (p >= 0)
|
||||
p += delta;
|
||||
|
||||
if ((p < 0) || (p >= depth) || (stack[p] != VALID_VAL))
|
||||
if ((p < 0) || (p >= letlimit) || (stack[p] != VALID_VAL))
|
||||
scheme_ill_formed_code(port);
|
||||
|
||||
stack[p] = VALID_BOX;
|
||||
|
|
|
@ -2683,7 +2683,7 @@ void scheme_validate_toplevel(Scheme_Object *expr, Mz_CPort *port,
|
|||
int num_toplevels, int num_stxes, int num_lifts,
|
||||
int skip_refs_check);
|
||||
void scheme_validate_boxenv(int pos, Mz_CPort *port,
|
||||
char *stack, int depth, int delta);
|
||||
char *stack, int depth, int delta, int letlimit);
|
||||
|
||||
int scheme_validate_rator_wants_box(Scheme_Object *app_rator, int pos,
|
||||
int hope,
|
||||
|
|
|
@ -2728,7 +2728,7 @@ static void bangboxenv_validate(Scheme_Object *data, Mz_CPort *port,
|
|||
if (!SCHEME_PAIRP(data))
|
||||
scheme_ill_formed_code(port);
|
||||
|
||||
scheme_validate_boxenv(SCHEME_INT_VAL(SCHEME_CAR(data)), port, stack, depth, delta);
|
||||
scheme_validate_boxenv(SCHEME_INT_VAL(SCHEME_CAR(data)), port, stack, depth, delta, letlimit);
|
||||
|
||||
scheme_validate_expr(port, SCHEME_CDR(data), stack, tls, depth, letlimit, delta,
|
||||
num_toplevels, num_stxes, num_lifts,
|
||||
|
|
Loading…
Reference in New Issue
Block a user