File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -655,11 +655,13 @@ when not defined(noSignalHandler) and not defined(useNimRtl):
655655 when defined (memtracker):
656656 logPendingOps ()
657657 # On windows, it is common that the signal handler is called from a non-Nim
658- # thread - until `rawWriteStackTrace` and friends learns to not allocate
659- # memory, we'll skip the memory allocation and avoid crashes this way
660- # On other platforms, the memory allocation may still cause crashes, but
661- # not as frequently. YOLO.
662- when hasSomeStackTrace and not defined (windows):
658+ # thread and any allocation will (likely) cause a crash.
659+ # On other platforms, if memory needs to be allocated and the signal happens
660+ # during memory allocation, we'll alos (likely) see a crash and corrupt the
661+ # memory allocator - less frequently than on windows but still.
662+ # However, since we're about to go down anyway, YOLO.
663+
664+ when hasSomeStackTrace:
663665 when not usesDestructors: GC_disable ()
664666 rawWriteStackTrace (sigHandlerBuf)
665667 processSignal (sign, sigHandlerBuf.add) # nice hu? currying a la Nim :-)
You can’t perform that action at this time.
0 commit comments