fix(test): free the return-type table in the go field-chain helper

run_go_field_chain_sequential tears down the results, registry and
cross arenas but never calls harness_ctx_free_tables, so pass_calls'
CBMReturnTypeTable (strdup'd method return types) leaked whenever the
helper ran. ASan builds caught it: AddressSanitizer: 32911 byte(s)
leaked in 6 allocation(s) from build_return_type_table, failing
test-diag, test-lsan-macos and both gcc sanitizer shards. Verify
locally: build/c/test-runner parallel -> 73 passed, no leaks.

Signed-off-by: xkchok <143325001+xkchok@users.noreply.github.com>
This commit is contained in:
xkchok committed 2026-09-01 15:52:15 +08:00
1 parent 4d20a42755
commit e11d5900cd
1 file changed
+1
+1
View File
@@ -3282,6 +3282,7 @@ static cbm_gbuf_t *run_go_field_chain_sequential(const char *project, const char
cbm_free_result(cache[i]);
}
free(cache);
harness_ctx_free_tables(&ctx);
cbm_registry_free(reg);
if (ctx.seq_cross_arena_live) {
cbm_arena_destroy(&ctx.seq_cross_arena);