mirror of
https://github.com/logos-messaging/nim-ffi.git
synced 2026-06-20 16:29:31 +00:00
Hammers one shared context from several threads, alternating the two ABIs of the same library: the native path (EchoRequest struct in, typed EchoResponse* back) and the CBOR path (encoded request in, CBOR map back), each verifying the echoed message round-trips. Exercises the POD deep-copy/free on the way in, the respPod deliver/free on the way out, and the request channel under contention. Run plain or with SAN=address / SAN=thread. Clean at 6 threads x 1500 iters (9000 calls per ABI) under both ASAN and TSAN — no leaks, use-after-free, or data races. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>