Skip to content

Commit 2e67608

Browse files
committed
Windows: enable nimRawSetjmp by default
See nim-lang#19197. The default setjmp can randomly segfault on windows
1 parent a4fdaa8 commit 2e67608

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

config/config.nims

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,10 @@ when defined(nimStrictMode):
2020
switch("hintAsError", "ConvFromXtoItselfNotNeeded")
2121
# future work: XDeclaredButNotUsed
2222

23+
if defined(windows):
24+
# Avoid some rare stack corruption while using exceptions with a SEH-enabled
25+
# toolchain: https://github.com/nim-lang/Nim/pull/19197
26+
switch("define", "nimRawSetjmp")
27+
2328
switch("define", "nimVersion:" & NimVersion)
2429
switch("define", "nimPreviewDotLikeOps")

0 commit comments

Comments
 (0)