Problem
Running zig build test-c-api -Dtsan=true instruments libzig-js.a, but the four public C/C++ host executables are built without sanitize_thread = tsan. Their links fail before execution with unresolved __tsan_* symbols.
This was exposed while validating #871. The inspector implementation itself passes the 24-test inspector group under TSan, and both pinned private inspector-agent fixtures pass under TSan; the failure is isolated to the public host build wiring.
Affected hosts:
c-api-smoke-cc-api-latin1c-api-smoke-cppc-api-inspector-smoke
Required implementation
- Propagate the existing
tsanbuild option into every public C/C++ host root module. - Keep the library and host instrumentation/link mode consistent without manual linker flags or environment workarounds.
- Verify the complete
test-c-apistep in Debug, ReleaseSafe, and TSan modes. - Preserve the pinned public ABI and generated headers unchanged.
Acceptance
zig build test-c-apipasses.zig build test-c-api -Doptimize=ReleaseSafepasses.zig build test-c-api -Dtsan=truelinks and passes with no sanitizer reports.zig build c-api-auditremains 117/117 complete.- Change flips 0 test262 cases.