Tweak ObjectDB instance leak warning message to mention object count

This helps assess how important the situation is to resolve
for project developers, without having to run the project with
`--verbose` again.
This commit is contained in:
Hugo Locurcio 2026-02-23 20:49:50 +01:00
parent 1aaea38e7f
commit 77706bffa3
No known key found for this signature in database
GPG key ID: 46ACE49F61685096
2 changed files with 5 additions and 2 deletions

View file

@ -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)