Browse Source

AppVeyor: Try to find segfault in debug build (not reproducible in local debugger) (7/?)

bel2125 7 năm trước cách đây
mục cha
commit
345c94b264
2 tập tin đã thay đổi với 4 bổ sung2 xóa
  1. 0 2
      src/civetweb.c
  2. 4 0
      test/private.c

+ 0 - 2
src/civetweb.c

@@ -3292,9 +3292,7 @@ mg_cry(const struct mg_connection *conn, const char *fmt, ...)
 	va_end(ap);
 	buf[sizeof(buf) - 1] = 0;
 
-#if !defined(_WIN32)
 	DEBUG_TRACE("mg_cry: %s", buf);
-#endif
 
 	if (!conn) {
 		puts(buf);

+ 4 - 0
test/private.c

@@ -493,6 +493,10 @@ START_TEST(test_mg_vsnprintf)
 	char buf[16];
 	int is_trunc;
 
+#if defined(_WIN32)
+	InitializeCriticalSection(&global_log_file_lock);
+#endif
+
 	memset(buf, 0, sizeof(buf));
 	mark_point();