diff options
| author | Mike Pall <mike> | 2023-09-15 05:31:26 +0200 |
|---|---|---|
| committer | Mike Pall <mike> | 2023-09-15 05:31:26 +0200 |
| commit | 7a1c139569874f371f567d060738a3f5704930a1 (patch) | |
| tree | 41ae9fb8c9e1dd404684da886e1ccda62bb08e6f /src | |
| parent | 18b8fd8de794d1de7c3193189f42c5b0534043f5 (diff) | |
| download | luajit-7a1c139569874f371f567d060738a3f5704930a1.tar.gz luajit-7a1c139569874f371f567d060738a3f5704930a1.tar.bz2 luajit-7a1c139569874f371f567d060738a3f5704930a1.zip | |
Windows: Pass scratch CONTEXT record to RtlUnwindEx.
Thanks to Peter Cawley. #593
Diffstat (limited to 'src')
| -rw-r--r-- | src/lj_err.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/lj_err.c b/src/lj_err.c index 8ef51bf2..9677a1b0 100644 --- a/src/lj_err.c +++ b/src/lj_err.c | |||
| @@ -285,8 +285,8 @@ LJ_FUNCA int lj_err_unwind_win(EXCEPTION_RECORD *rec, | |||
| 285 | /* Don't catch access violations etc. */ | 285 | /* Don't catch access violations etc. */ |
| 286 | return 1; /* ExceptionContinueSearch */ | 286 | return 1; /* ExceptionContinueSearch */ |
| 287 | } | 287 | } |
| 288 | #if LJ_TARGET_X86 | ||
| 289 | UNUSED(ctx); | 288 | UNUSED(ctx); |
| 289 | #if LJ_TARGET_X86 | ||
| 290 | UNUSED(dispatch); | 290 | UNUSED(dispatch); |
| 291 | /* Call all handlers for all lower C frames (including ourselves) again | 291 | /* Call all handlers for all lower C frames (including ourselves) again |
| 292 | ** with EH_UNWINDING set. Then call the specified function, passing cf | 292 | ** with EH_UNWINDING set. Then call the specified function, passing cf |
| @@ -304,7 +304,8 @@ LJ_FUNCA int lj_err_unwind_win(EXCEPTION_RECORD *rec, | |||
| 304 | RtlUnwindEx(f, (void *)((cframe_unwind_ff(cf2) && errcode != LUA_YIELD) ? | 304 | RtlUnwindEx(f, (void *)((cframe_unwind_ff(cf2) && errcode != LUA_YIELD) ? |
| 305 | lj_vm_unwind_ff_eh : | 305 | lj_vm_unwind_ff_eh : |
| 306 | lj_vm_unwind_c_eh), | 306 | lj_vm_unwind_c_eh), |
| 307 | rec, (void *)(uintptr_t)errcode, ctx, dispatch->HistoryTable); | 307 | rec, (void *)(uintptr_t)errcode, dispatch->ContextRecord, |
| 308 | dispatch->HistoryTable); | ||
| 308 | /* RtlUnwindEx should never return. */ | 309 | /* RtlUnwindEx should never return. */ |
| 309 | #endif | 310 | #endif |
| 310 | } | 311 | } |
