Skip to content

Commit

Permalink
Windows: define "nimRawSetjmp" (#3204)
Browse files Browse the repository at this point in the history
Avoids some rare crashes. Fixes #3121
  • Loading branch information
stefantalpalaru authored Dec 17, 2021
1 parent 9311d0a commit 7eecbed
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions config.nims
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ if defined(windows):
# because these require direct manipulations of the stdout File object.
switch("define", "chronicles_colors=off")

# Avoid some rare stack corruption while using exceptions with a SEH-enabled
# toolchain: https://github.com/status-im/nimbus-eth2/issues/3121
switch("define", "nimRawSetjmp")

# This helps especially for 32-bit x86, which sans SSE2 and newer instructions
# requires quite roundabout code generation for cryptography, and other 64-bit
# and larger arithmetic use cases, along with register starvation issues. When
Expand Down

0 comments on commit 7eecbed

Please sign in to comment.