Ray's fix to mprotect logic
svn: r2853
This commit is contained in:
parent
c8b3032775
commit
06f7b8603b
|
@ -2258,7 +2258,12 @@ scheme_lookup_binding(Scheme_Object *find_id, Scheme_Comp_Env *env, int flags,
|
|||
int issame;
|
||||
if (frame->flags & SCHEME_CAPTURE_WITHOUT_RENAME)
|
||||
issame = scheme_stx_module_eq(find_id, COMPILE_DATA(frame)->const_names[i], phase);
|
||||
else {
|
||||
else if (frame->flags & SCHEME_FOR_INTDEF) {
|
||||
/* Comparing to uid is unreliable in case the bound
|
||||
identifier has multiple renamings at the same level, so
|
||||
use the general stx_bound_eq function: */
|
||||
issame = scheme_stx_bound_eq(find_id, COMPILE_DATA(frame)->const_names[i], phase);
|
||||
} else {
|
||||
if (COMPILE_DATA(frame)->const_uids) uid = COMPILE_DATA(frame)->const_uids[i];
|
||||
issame = (SAME_OBJ(SCHEME_STX_VAL(find_id),
|
||||
SCHEME_STX_VAL(COMPILE_DATA(frame)->const_names[i]))
|
||||
|
@ -3573,6 +3578,7 @@ local_get_shadower(int argc, Scheme_Object *argv[])
|
|||
break;
|
||||
|
||||
for (i = COMPILE_DATA(frame)->num_const; i--; ) {
|
||||
printf("here %s\n", SCHEME_SYM_VAL(SCHEME_STX_SYM(sym)));
|
||||
if (!(frame->flags & SCHEME_CAPTURE_WITHOUT_RENAME)) {
|
||||
if (SAME_OBJ(SCHEME_STX_VAL(sym),
|
||||
SCHEME_STX_VAL(COMPILE_DATA(frame)->const_names[i]))) {
|
||||
|
@ -3580,9 +3586,13 @@ local_get_shadower(int argc, Scheme_Object *argv[])
|
|||
env_marks = scheme_stx_extract_marks(esym);
|
||||
if (scheme_equal(env_marks, sym_marks)) {
|
||||
sym = esym;
|
||||
if (COMPILE_DATA(frame)->const_uids)
|
||||
uid = COMPILE_DATA(frame)->const_uids[i];
|
||||
else
|
||||
if (COMPILE_DATA(frame)->const_uids) {
|
||||
if (frame->flags & SCHEME_FOR_INTDEF) {
|
||||
return esym;
|
||||
} else {
|
||||
uid = COMPILE_DATA(frame)->const_uids[i];
|
||||
}
|
||||
} else
|
||||
uid = frame->uid;
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -78,8 +78,9 @@ jit_flush_code(void *dest, void *end)
|
|||
prev_length = page + length - prev_page;
|
||||
|
||||
/* See if we can extend the previously mprotect'ed memory area towards
|
||||
lower addresses: the highest address remains the same as before. */
|
||||
else if (page < prev_page && page + length <= prev_page + prev_length)
|
||||
lower addresses: the highest address remains the same as before. */
|
||||
else if (page < prev_page && page + length >= prev_page
|
||||
&& page + length <= prev_page + prev_length)
|
||||
prev_length += prev_page - page, prev_page = page;
|
||||
|
||||
/* Nothing to do, replace the area. */
|
||||
|
|
Loading…
Reference in New Issue
Block a user