fix: bind allocation sessions in worker threads
CI / lint (pull_request) Successful in 11s
CI / sanitizers (address) (pull_request) Successful in 36s
CI / sanitizers (undefined) (pull_request) Successful in 36s
CI / fuzz-build (pull_request) Successful in 15s
CI / coverage (pull_request) Successful in 32s
CI / build-and-test (pull_request) Successful in 1m15s
CI / valgrind (pull_request) Successful in 33s

This commit is contained in:
2026-09-04 01:56:34 +02:00
parent e491e811e3
commit 0d306940e1
9 changed files with 123 additions and 19 deletions
+2 -1
View File
@@ -295,7 +295,8 @@ void handler(int file_descriptor) {
return;
}
protocol_session_set_max_alloc(&context->session, config->max_alloc);
context->session.total_allocated_bytes = session.total_allocated_bytes;
atomic_store(&context->session.total_allocated_bytes,
atomic_load(&session.total_allocated_bytes));
thrd_t receiver, writer;
bool receiver_created = thrd_create(&receiver, receive_thread, context) == thrd_success;
bool writer_created = false;