Bug 1195777 - When LSan detects leaks, tell the user about the report_objects option. r=chmanchester

MozReview-Commit-ID: KWNye8GdEKv
This commit is contained in:
Andrew McCreight 2016-07-29 16:08:06 -07:00
Родитель 82ac383602
Коммит bbdc92f231
2 изменённых файлов: 6 добавлений и 0 удалений

Просмотреть файл

@ -232,6 +232,10 @@ class LSANLeaks(object):
self.logger.warning(
"TEST-UNEXPECTED-FAIL | LeakSanitizer | LeakSanitizer has encountered a fatal error.")
if self.foundFrames:
self.logger.info("TEST-INFO | LeakSanitizer | To show the addresses of leaked objects add report_objects=1 to LSAN_OPTIONS")
self.logger.info("TEST-INFO | LeakSanitizer | This can be done in testing/mozbase/mozrunner/mozrunner/utils.py")
for f in self.foundFrames:
self.logger.warning(
"TEST-UNEXPECTED-FAIL | LeakSanitizer | leak at " + f)

Просмотреть файл

@ -185,6 +185,8 @@ def test_environment(xrePath, env=None, crashreporter=True, debugger=False,
log.info("LSan enabled.")
asanOptions.append('detect_leaks=1')
lsanOptions = ["exitcode=0"]
# Uncomment out the next line to report the addresses of leaked objects.
#lsanOptions.append("report_objects=1")
suppressionsFile = os.path.join(
lsanPath, 'lsan_suppressions.txt')
if os.path.exists(suppressionsFile):