Avoid an occasional invalid memory violation on Windows in S_call_help

original commit: c2d2467d48eea145455124343c8819dfb683c39e
This commit is contained in:
Bob Burger 2018-06-15 16:42:09 -04:00
parent 49be8b2e3a
commit 2f355b464e
2 changed files with 6 additions and 2 deletions

2
LOG
View File

@ -956,3 +956,5 @@
- Repair x86_64 `&` foreign-procedure result type handling for types of a - Repair x86_64 `&` foreign-procedure result type handling for types of a
small size that is not a multiple of the word size small size that is not a multiple of the word size
x86_64.ss, foreign.ms, foreign4.c x86_64.ss, foreign.ms, foreign4.c
- Avoid an occasional invalid memory violation on Windows in S_call_help
schlib.c

View File

@ -206,9 +206,11 @@ static ptr S_call(tc, cp, argcnt) ptr tc; ptr cp; iptr argcnt; {
} }
/* args are set up, argcnt in ac0, closure in ac1 */ /* args are set up, argcnt in ac0, closure in ac1 */
void S_call_help(tc, singlep, lock_ts) ptr tc; IBOOL singlep; IBOOL lock_ts; { void S_call_help(tc_in, singlep, lock_ts) ptr tc_in; IBOOL singlep; IBOOL lock_ts; {
/* declaring code volatile should be unnecessary, but it quiets gcc */ /* declaring code and tc volatile should be unnecessary, but it quiets gcc
and avoids occasional invalid memory violations on Windows */
void *jb; volatile ptr code; void *jb; volatile ptr code;
volatile ptr tc = tc_in;
/* lock caller's code object, since his return address is sitting in /* lock caller's code object, since his return address is sitting in
the C stack and we may end up in a garbage collection */ the C stack and we may end up in a garbage collection */