From ae2b30a48f5cf0cda91c395a5af20cfa7769d5dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sa=C3=BAl=20Ibarra=20Corretg=C3=A9?= Date: Tue, 26 Feb 2013 11:17:49 +0100 Subject: [PATCH] windows: initialize stop_flag explicitly The default loop lives in the bss section so it's zeroed on startup but loops created with uv_loop_new() live on the heap and contain random garbage. Initialize the stop_flag explicitly to avoid spurious bugs. --- src/win/core.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/win/core.c b/src/win/core.c index 497fa883..a06c23f3 100644 --- a/src/win/core.c +++ b/src/win/core.c @@ -116,6 +116,7 @@ static void uv_loop_init(uv_loop_t* loop) { loop->active_udp_streams = 0; loop->timer_counter = 0; + loop->stop_flag = 0; loop->last_err = uv_ok_; }