Skip to content

Commit 7007024

Browse files
authored
fix exception unwinding with libcmtd.lib/vcruntime140d.dll 14.40.x from VS 17.11 (#4683)
1 parent 49e5732 commit 7007024

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

runtime/druntime/src/ldc/eh_msvc.d

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -458,6 +458,8 @@ void msvc_eh_terminate() nothrow @naked
458458
mov $$0xccc348c48348c033, %rbx // xor eax,eax; add rsp,48h; ret; int 3
459459
cmp 0x2d(%rax), %rbx // (libcmtd.lib, 14.23.x.x)
460460
je L_retVC14_23_libcmtd
461+
cmp 0x2e(%rax), %rbx // (libcmtd.lib/vcruntime140d.lib, 14.40.x.x)
462+
je L_retVC14_40_libcmtd
461463
462464
jmp L_term
463465
@@ -475,6 +477,10 @@ void msvc_eh_terminate() nothrow @naked
475477
lea 0x2f(%rax), %rax
476478
jmp L_rbxRestored // rbx not saved
477479
480+
L_retVC14_40_libcmtd: // libcmtd.lib/vcruntime140d.dll 14.40.33810
481+
lea 0x30(%rax), %rax
482+
jmp L_rbxRestored // rbx not saved
483+
478484
L_retVC14_14: // (vcruntime140.dll 14.14.x.y)
479485
lea 0x20(%rax), %rax
480486
jmp L_retContinue

0 commit comments

Comments
 (0)