From d9d70cc2fe7d82bd981b745dbc986353dfc626b9 Mon Sep 17 00:00:00 2001 From: Ivan FB Date: Wed, 24 Jun 2026 21:25:22 +0200 Subject: [PATCH] fix: bump nim-ffi to a66c53a (cwire + foreign-host-concurrency fix) The cwire-only nim-ffi (7362bfd, the re-pointed v0.2.0-rc.1 tag) crashed with a foreign-thread GC null-avltree fault inside sds_unwrap_received_message: that line branched off before the foreign-host-concurrency fix and was missing the cycle-collector rooting (GC_ref(myLib[])), so the SDS manager ref could be collected mid-use and fault on a later alloc. a66c53a is nim-ffi release/v0.2 = cwire + the full fix cherry-picked (a6b22fc event-listener GC setup + c3d135f context-recycling / GC_ref rooting). Pinned by immutable SHA (lock + deps.nix + sds.nimble) to avoid the mutable-tag drift that caused this. Validated: libsds builds, nimble test green (106/0), and the previously crashing status-go TestAcceptCRRemoveAndRepeat passes 5/5. Co-Authored-By: Claude Opus 4.8 --- nimble.lock | 4 ++-- nix/deps.nix | 4 ++-- sds.nimble | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/nimble.lock b/nimble.lock index e9722be..8580f23 100644 --- a/nimble.lock +++ b/nimble.lock @@ -224,7 +224,7 @@ }, "ffi": { "version": "0.2.0", - "vcsRevision": "7362bfd212a8accb0706a4785f79edf8d89a7867", + "vcsRevision": "a66c53a34b8c44cbb952294585942ca4434a9321", "url": "https://github.com/logos-messaging/nim-ffi", "downloadMethod": "git", "dependencies": [ @@ -234,7 +234,7 @@ "cbor_serialization" ], "checksums": { - "sha1": "544b7be2a2c6b3a7f41ee57baf5ddaff5f700b11" + "sha1": "edc4f13560feef402582e9fff98788976b166ce2" } } }, diff --git a/nix/deps.nix b/nix/deps.nix index 78e2ffa..3a94624 100644 --- a/nix/deps.nix +++ b/nix/deps.nix @@ -124,8 +124,8 @@ ffi = pkgs.fetchgit { url = "https://github.com/logos-messaging/nim-ffi"; - rev = "7362bfd212a8accb0706a4785f79edf8d89a7867"; - sha256 = "0lwyzqcg0m0mad64kyfbh9z5b1bf5ymksg7fzhzmfy9zq6jqwnns"; + rev = "a66c53a34b8c44cbb952294585942ca4434a9321"; + sha256 = "1vnfzi9a9fhpspr963z5in2g6n4lm4xcgrbvzm3fgfiqc5i6l6sa"; fetchSubmodules = true; }; diff --git a/sds.nimble b/sds.nimble index c71d523..37a22de 100644 --- a/sds.nimble +++ b/sds.nimble @@ -24,7 +24,7 @@ requires "results" when existsEnv("SDS_NIX_DEPS"): requires "ffi >= 0.2.0" else: - requires "https://github.com/logos-messaging/nim-ffi#v0.2.0-rc.1" + requires "https://github.com/logos-messaging/nim-ffi#a66c53a34b8c44cbb952294585942ca4434a9321" requires "https://github.com/vacp2p/nim-cbor-serialization#v0.3.0" proc buildLibrary(