Skip to content

Commit eb55059

Browse files
test-barrier: release threadpool before releasing the context
fixes use-after-free detected by gcc thread-sanitizer on x86-64 for some reason llvm sanitizer is not detecting this issue.
1 parent a809518 commit eb55059

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/test-barrier.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@ int main(int argc, char *argv[]) {
8686
<< "\n " << (float) nsec / (n_rounds * n_nodes) << " nsec per-node"
8787
<< "\n";
8888

89-
ggml_free(ctx);
9089
ggml_threadpool_free(threadpool);
90+
ggml_free(ctx);
9191

9292
return 0;
9393
}

0 commit comments

Comments
 (0)