diff --git a/core/object/object.cpp b/core/object/object.cpp index 43999ba4cf..2dee1f5c59 100644 --- a/core/object/object.cpp +++ b/core/object/object.cpp @@ -2641,7 +2641,7 @@ void ObjectDB::cleanup() { spin_lock.lock(); if (slot_count > 0) { - WARN_PRINT("ObjectDB instances leaked at exit (run with --verbose for details)."); + WARN_PRINT(vformat("%d ObjectDB %s leaked at exit (run with `--verbose` for details).", slot_count, slot_count == 1 ? "instance was" : "instances were")); if (OS::get_singleton()->is_stdout_verbose()) { // Ensure calling the native classes because if a leaked instance has a script // that overrides any of those methods, it'd not be OK to call them at this point, diff --git a/misc/scripts/check_ci_log.py b/misc/scripts/check_ci_log.py index 8c6eba669d..171783e7b3 100755 --- a/misc/scripts/check_ci_log.py +++ b/misc/scripts/check_ci_log.py @@ -46,7 +46,10 @@ if file_contents.find("ERROR: LeakSanitizer:") != -1: # this possibility should also be handled as a potential error, even if # LeakSanitizer doesn't report anything -if file_contents.find("ObjectDB instances leaked at exit") != -1: +if ( + file_contents.find("ObjectDB instance was leaked at exit") != -1 + or file_contents.find("ObjectDB instances were leaked at exit") != -1 +): print("ERROR: Memory leak was found") sys.exit(54)