On 30/12/21 23:36, Jirka Novak wrote:
Dear John,
I was working on a MR for moving the text2pcap/text_import debug over 
to the ws_log features and I ran into a seemingly bizarre problem. 
Setting the log level to a non-default value causes the pytest 
procedures to fail with heap corruption on the Gitlab Windows CI.
...
I'm touching similar issue just on Windows platform when running 
extcap from Wireshark. Extcap dies when logging level is set to file 
and file size increases by subsequent ws_log related writes over 4192 
bytes.
I found that if I disable part of code, it works fine including 
writing messages to log. Can you try it too:
wsutil/wslog.c in log_write_dispatch() comment out second call of 
log_write_do_log():
diff --git a/wsutil/wslog.c b/wsutil/wslog.c
index f0f87eaa6e..8e49b6200c 100644
--- a/wsutil/wslog.c
+++ b/wsutil/wslog.c
@@ -965,11 +965,14 @@ static void log_write_dispatch(const char 
*domain, enum ws_log_level level,
                         user_format, user_ap, 
registered_log_writer_data);
     }
     else {
+       // TODO: Fix it
+    /*
         log_write_do_work(console_file(level), 
console_color_enabled(level),
                             get_localtime(tstamp.tv_sec, &cookie),
                             tstamp.tv_nsec,
                             domain, level, file, line, func,
                             user_format, user_ap);
+                           */
     }
A few weeks ago I worked with João Valverde on changes in logging for 
extcaps, but I don't think we touched this part.
João Valverde, can you check our findings?
Sure, I can try. I think it would be better if you opened an issue in 
the bug tracker for that.
I don't see any setlocale() calls in extcaps so that is worth checking, 
per Gerald's suggestion.