diff options
author | Ștefan Talpalaru <stefantalpalaru@yahoo.com> | 2021-12-10 06:31:29 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-10 06:31:29 +0100 |
commit | 69aabdab800077e9aaa08344494c83138a02f57c (patch) | |
tree | c87bad90e26a6617c8875d36db420ccabc991fe8 /tests/exception/texceptions.nim | |
parent | 32d4bf352585a4fc4a6fa1bd24b270af087b0372 (diff) | |
download | Nim-69aabdab800077e9aaa08344494c83138a02f57c.tar.gz |
nimRawSetjmp: support Windows (#19197)
* nimRawSetjmp: support Windows Using `_setjmp()` directly is required to avoid some rare (but very annoying) exception-related stack corruption leading to segfaults on Windows, with Mingw-w64 and SEH. More details: https://github.com/status-im/nimbus-eth2/issues/3121 Also add "nimBuiltinSetjmp" - mostly for benchmarking. * fix for Apple's Clang++
Diffstat (limited to 'tests/exception/texceptions.nim')
-rw-r--r-- | tests/exception/texceptions.nim | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/exception/texceptions.nim b/tests/exception/texceptions.nim index adee5d1d5..62d24c934 100644 --- a/tests/exception/texceptions.nim +++ b/tests/exception/texceptions.nim @@ -1,4 +1,6 @@ discard """ + disabled: "windows" # no sigsetjmp() there + matrix: "-d:nimStdSetjmp; -d:nimSigSetjmp; -d:nimRawSetjmp; -d:nimBuiltinSetjmp" output: ''' BEFORE @@ -17,7 +19,7 @@ FINALLY echo "" -proc no_expcetion = +proc no_exception = try: echo "BEFORE" @@ -28,7 +30,7 @@ proc no_expcetion = finally: echo "FINALLY" -try: no_expcetion() +try: no_exception() except: echo "RECOVER" echo "" |