Skip to content

Commit e11d590

Browse files
committed
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>
1 parent 4d20a42 commit e11d590

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎tests/test_parallel.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3282,6 +3282,7 @@ static cbm_gbuf_t *run_go_field_chain_sequential(const char *project, const char
32823282
cbm_free_result(cache[i]);
32833283
}
32843284
free(cache);
3285+
harness_ctx_free_tables(&ctx);
32853286
cbm_registry_free(reg);
32863287
if (ctx.seq_cross_arena_live) {
32873288
cbm_arena_destroy(&ctx.seq_cross_arena);

0 commit comments

Comments
 (0)