Closed Bug 959155 Opened 10 years ago Closed 10 years ago

Jit-test basic\bug698584.js fails on Windows test machines

Categories

(Core :: JavaScript Engine, defect)

ARM
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla30

People

(Reporter: dminor, Assigned: dminor)

References

Details

Attachments

(1 file)

On recent Cedar runs this test fails on Windows XP (opt, debug) and Windows 7 (debug).

On Windows XP opt (only) the following shows up in the log:
TEST-UNEXPECTED-FAIL | tests\jit-test\jit-test\tests\basic\bug698584.js |
INFO stderr 2> C:\slave\test\build\tests\jit-test\jit-test\tests\basic\bug698584.js:18:2 Error: Assertion failed: got "out of memory", expected "InternalError: allocation size overflow"
Took a further look at this on a XP loaner. The body of the test looks like this:
  const MAX = 10000;
  var str = "";
  for (var i = 0; i < MAX; ++i) {
      /x/.test(str);
      str += str + 'xxxxxxxxxxxxxx';
  }

Changing MAX from 10000 to 25 is sufficient to cause the reported OOM. The test machine reports 3GB of memory. 

The Win XP test machines seem sensitive to allocation size. I fixed a cppunittest failure in bug 943390 that was doing something similar, growing an array to test that it would fail gracefully instead of with an OOM. In that case, making more small allocations rather than fewer large allocations was enough to get the test working.

Strangely, I was not able to reproduce the 'debug' failure on the loaner machine, even using a build of jsshell that failed on Cedar.
Would it be possible to change the assertion here to something like:
expect = '\(InternalError: allocation size overflow|out of memory\)';

I notice this is done for some of the other tests. The original bug was a crash: we're not crashing, just throwing a different exception in this case.
Flags: needinfo?(terrence)
Yes, those two strings are basically just running out of memory in different ways. We should make the testsuite make that distinction automatically. For now just checking both would be fine.
Flags: needinfo?(terrence)
Try run here: https://tbpl.mozilla.org/?tree=Try&rev=1e68811c67e5&showall=1

On closer examination, it turns out the WinXP Debug failure was a timeout, not an out of memory, so I will take a look at that separately.
Assignee: nobody → dminor
Status: NEW → ASSIGNED
Attachment #8369393 - Flags: review?(terrence)
Comment on attachment 8369393 [details] [diff] [review]
Allow out of memory exception

Review of attachment 8369393 [details] [diff] [review]:
-----------------------------------------------------------------

Great! r=me
Attachment #8369393 - Flags: review?(terrence) → review+
https://hg.mozilla.org/mozilla-central/rev/3035d33537ff
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla30
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: