зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1287877 - Fail when LeakSanitizer encounters a fatal error. r=jgriffin
This commit is contained in:
Родитель
3e7a8efdae
Коммит
916e425911
|
@ -158,6 +158,7 @@ class LSANLeaks(object):
|
||||||
def __init__(self, logger):
|
def __init__(self, logger):
|
||||||
self.logger = logger
|
self.logger = logger
|
||||||
self.inReport = False
|
self.inReport = False
|
||||||
|
self.fatalError = False
|
||||||
self.foundFrames = set([])
|
self.foundFrames = set([])
|
||||||
self.recordMoreFrames = None
|
self.recordMoreFrames = None
|
||||||
self.currStack = None
|
self.currStack = None
|
||||||
|
@ -177,6 +178,8 @@ class LSANLeaks(object):
|
||||||
|
|
||||||
self.startRegExp = re.compile(
|
self.startRegExp = re.compile(
|
||||||
"==\d+==ERROR: LeakSanitizer: detected memory leaks")
|
"==\d+==ERROR: LeakSanitizer: detected memory leaks")
|
||||||
|
self.fatalErrorRegExp = re.compile(
|
||||||
|
"==\d+==LeakSanitizer has encountered a fatal error.")
|
||||||
self.stackFrameRegExp = re.compile(" #\d+ 0x[0-9a-f]+ in ([^(</]+)")
|
self.stackFrameRegExp = re.compile(" #\d+ 0x[0-9a-f]+ in ([^(</]+)")
|
||||||
self.sysLibStackFrameRegExp = re.compile(
|
self.sysLibStackFrameRegExp = re.compile(
|
||||||
" #\d+ 0x[0-9a-f]+ \(([^+]+)\+0x[0-9a-f]+\)")
|
" #\d+ 0x[0-9a-f]+ \(([^+]+)\+0x[0-9a-f]+\)")
|
||||||
|
@ -186,6 +189,10 @@ class LSANLeaks(object):
|
||||||
self.inReport = True
|
self.inReport = True
|
||||||
return
|
return
|
||||||
|
|
||||||
|
if re.match(self.fatalErrorRegExp, line):
|
||||||
|
self.fatalError = True
|
||||||
|
return
|
||||||
|
|
||||||
if not self.inReport:
|
if not self.inReport:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
@ -221,6 +228,10 @@ class LSANLeaks(object):
|
||||||
# We'll end up with "unknown stack" if everything is ignored.
|
# We'll end up with "unknown stack" if everything is ignored.
|
||||||
|
|
||||||
def process(self):
|
def process(self):
|
||||||
|
if self.fatalError:
|
||||||
|
self.logger.warning(
|
||||||
|
"TEST-UNEXPECTED-FAIL | LeakSanitizer | LeakSanitizer has encountered a fatal error.")
|
||||||
|
|
||||||
for f in self.foundFrames:
|
for f in self.foundFrames:
|
||||||
self.logger.warning(
|
self.logger.warning(
|
||||||
"TEST-UNEXPECTED-FAIL | LeakSanitizer | leak at " + f)
|
"TEST-UNEXPECTED-FAIL | LeakSanitizer | leak at " + f)
|
||||||
|
|
Загрузка…
Ссылка в новой задаче