bug 474102 - limit the number of collected messages per test to less than 1000 to prevent post-process-logs.pl from running out of memory in extreme cases.

This commit is contained in:
Bob Clary 2009-01-20 02:16:22 -08:00
parent 03ecd5f9cf
commit 2c1af81766

View File

@ -494,9 +494,11 @@ while ($file = shift @ARGV)
!/real.*user.*sys.*$/ &&
!/user.*system.*elapsed/)
{
if ('runningtest, reportingtest' =~ /$state/)
if ('runningtest, reportingtest' =~ /$state/ && $#messages < 1000)
{
# limit the number of processed and collected messages since firefox can
# go berserk and dump a couple of million output lines for a single test
# if things go horribly wrong.
if (/error: can.t allocate region/ || /set a breakpoint in malloc_error_break/ ||
/set a breakpoint in szone_error to debug/ || /malloc:.*mmap/ || /vm_allocate/ ||
/terminate called after throwing an instance of .*bad_alloc/)