fix: copy AppState via memcpy to avoid stack overflow
Co-authored-by: aider (deepseek/deepseek-coder) <aider@aider.chat>
This commit is contained in:
@@ -594,7 +594,7 @@ static void* dispatcher_thread_func(void *arg) {
|
||||
// ============================================================
|
||||
|
||||
DispatchFn dispatcher_init(AppState *initial_state) {
|
||||
dispatcher.state = *initial_state;
|
||||
memcpy(&dispatcher.state, initial_state, sizeof(AppState));
|
||||
atomic_store(&dispatcher.running, false);
|
||||
atomic_store(&dispatcher.write_index, 0);
|
||||
atomic_store(&dispatcher.read_index, 0);
|
||||
|
||||
Reference in New Issue
Block a user