From afc5ec6931edd11b16e4e57d4d534c37e4a4fb99 Mon Sep 17 00:00:00 2001 From: Ivan FB Date: Fri, 12 Jun 2026 00:50:59 +0200 Subject: [PATCH] debug: revert signal handler, add wrap capture-check marker Co-Authored-By: Claude Opus 4.8 --- library/libsds.nim | 1 + sds.nimble | 5 +---- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/library/libsds.nim b/library/libsds.nim index 80fb492..0572b23 100644 --- a/library/libsds.nim +++ b/library/libsds.nim @@ -171,6 +171,7 @@ proc sdsCreate*( proc sdsWrapOutgoingMessage*( rm: ReliabilityManager, req: SdsWrapRequest ): Future[Result[SdsWrapResponse, string]] {.ffi.} = + sdsdbg("libsds.sdsWrap: body entered (capture-check) msgLen=" & $req.message.len) let wrapped = ( await wrapOutgoingMessage( rm, req.message, req.messageId.SdsMessageID, req.channelId.SdsChannelID diff --git a/sds.nimble b/sds.nimble index 2293e83..80a9d29 100644 --- a/sds.nimble +++ b/sds.nimble @@ -38,11 +38,8 @@ proc buildLibrary( " --threads:on --app:lib --opt:size --noMain --mm:refc --header --nimMainPrefix:libsds -d:noSignalHandler " & extra_params & " " & srcDir & name & ".nim" else: - # TEMP DEBUG: enable Nim's signal handler (drop -d:noSignalHandler, pass the - # nim-ffi guard via -d:ffiAllowSignalHandler) + stack/line traces so a SIGSEGV - # prints a Nim file:line traceback instead of being swallowed by Go's handler. exec "nim c" & " --out:build/" & outLibNameAndExt & - " --threads:on --app:lib --opt:size --noMain --mm:refc --header --nimMainPrefix:libsds -d:ffiAllowSignalHandler --stackTrace:on --lineTrace:on " & + " --threads:on --app:lib --opt:size --noMain --mm:refc --header --nimMainPrefix:libsds -d:noSignalHandler " & extra_params & " " & srcDir & name & ".nim" proc getMyCpu(): string =