mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-12 20:18:20 +00:00
Merge pull request #2607 from zachjs/logger-error-atexit
Fix double-free on unmatched logger error pattern
This commit is contained in:
commit
fffbf651df
|
@ -345,9 +345,6 @@ static void logv_error_with_prefix(const char *prefix,
|
||||||
|
|
||||||
log_make_debug = bak_log_make_debug;
|
log_make_debug = bak_log_make_debug;
|
||||||
|
|
||||||
if (log_error_atexit)
|
|
||||||
log_error_atexit();
|
|
||||||
|
|
||||||
for (auto &item : log_expect_error)
|
for (auto &item : log_expect_error)
|
||||||
if (YS_REGEX_NS::regex_search(log_last_error, item.second.pattern))
|
if (YS_REGEX_NS::regex_search(log_last_error, item.second.pattern))
|
||||||
item.second.current_count++;
|
item.second.current_count++;
|
||||||
|
@ -355,6 +352,9 @@ static void logv_error_with_prefix(const char *prefix,
|
||||||
if (check_expected_logs)
|
if (check_expected_logs)
|
||||||
log_check_expected();
|
log_check_expected();
|
||||||
|
|
||||||
|
if (log_error_atexit)
|
||||||
|
log_error_atexit();
|
||||||
|
|
||||||
YS_DEBUGTRAP_IF_DEBUGGING;
|
YS_DEBUGTRAP_IF_DEBUGGING;
|
||||||
|
|
||||||
#ifdef EMSCRIPTEN
|
#ifdef EMSCRIPTEN
|
||||||
|
|
Loading…
Reference in a new issue