Windows: define "nimRawSetjmp" (#3204)

Avoids some rare crashes. Fixes https://github.com/status-im/nimbus-eth2/issues/3121
This commit is contained in:
Ștefan Talpalaru 2021-12-17 04:05:47 +01:00 committed by GitHub
parent 9311d0a887
commit 7eecbedf3e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -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