Closed Bug 927801 Opened 8 years ago Closed 8 years ago

GenerationalGC: Some jit-tests fail with InternalError: too much recursion

Categories

(Core :: JavaScript Engine, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla27

People

(Reporter: jonco, Assigned: jonco)

References

Details

Attachments

(1 file)

In browser builds, the following jitests fail on Linux 32 builds:

TEST-UNEXPECTED-FAIL | js/src/jit-test/tests/bug793385.js | --baseline-eager --no-ti --no-fpu
TEST-UNEXPECTED-FAIL | js/src/jit-test/tests/basic/testBug756919.js | --baseline-eager --no-ti --no-fpu
TEST-UNEXPECTED-FAIL | js/src/jit-test/tests/basic/testBug840012.js | --baseline-eager --no-ti --no-fpu

These tests all contain a function which calls itself recursively forever and expect to fail with out of memory.

However it seems that with GGC and this set of flags (actually --no-fpu can be removed with no effect), we do not run out of memory but the recursion limit first instead.
Just to be clear, I don't think this is a problem with GGC, but with the test setup.

I'm not sure what the best solution is.  I don't think we should alter the tests as this could disturb whatever they are testing.  

It's a bit hacky, but perhaps the best approach is to change the jittest harness so that we can specify that these tests should always be run with TI enabled, which will make them fail in the expected way.
The problem here is that with ggc on /all/ of the objects in the test land in the nursery and never make it to the tenured heap. We never allocate from the tenured heap and we never hit this assertion. The solution I used in bug 924986 was to make an upvar reference from the recursive function, guaranteeing that we'd need a call object per frame.
Great, I see bug 924986 fixed two of these.  Here's a patch for the first one.
Assignee: nobody → jcoppeard
Status: NEW → ASSIGNED
Attachment #820356 - Flags: review?(terrence)
Comment on attachment 820356 [details] [diff] [review]
bug927801-misc-jittest-failures

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

\o/ Thanks, Jon! Odd that this one didn't fail for me when the other two did.
Attachment #820356 - Flags: review?(terrence) → review+
https://hg.mozilla.org/mozilla-central/rev/f2a3498171e8
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla27
You need to log in before you can comment on or make changes to this bug.