Closed Bug 494045 Opened 15 years ago Closed 15 years ago

TM: setting scopeChain to NULL in SynthesizeFrame breaks GetCallObject

Categories

(Core :: JavaScript Engine, defect, P1)

defect

Tracking

()

VERIFIED FIXED
mozilla1.9.2a1

People

(Reporter: standard8, Assigned: gal)

References

Details

(Keywords: crash, regression, verified1.9.1, Whiteboard: fixed-in-tracemonkey)

Attachments

(2 files, 1 obsolete file)

Attached file Crash stack
With the landing of the tracemonkey merge on 20th May, some of the mailnews xpcshell tests have started crashing. The tests that fail are:

TEST-UNEXPECTED-FAIL | /Volumes/Build/macosx-comm-central-check/build/objdir/mozilla/_tests/xpcshell/test_imap/unit/test_bug460636.js | test failed (with xpcshell return code: -10), see following log:
TEST-UNEXPECTED-FAIL | /Volumes/Build/macosx-comm-central-check/build/objdir/mozilla/_tests/xpcshell/test_imap/unit/test_compactOfflineStore.js | test failed (with xpcshell return code: -10), see following log:
TEST-UNEXPECTED-FAIL | /Volumes/Build/macosx-comm-central-check/build/objdir/mozilla/_tests/xpcshell/test_imap/unit/test_downloadOffline.js | test failed (with xpcshell return code: -10), see following log:
TEST-UNEXPECTED-FAIL | /Users/moztest/comm/trunk/tb/mozilla/_tests/xpcshell/test_imap/unit/test_nsIMsgFolderListenerIMAP.js | test failed (with xpcshell return code: -10), see following log:

The logs aren't interesting as there are no additional warnings/errors and we don't get crash stacks at the moment.

However I've run the tests on my machine and the crash stack from one of the failures is attached.

I've verified by reverting the mozilla-central repository to the revision before the landing (a3b152e3e972) and then updated to the merge set of the landing (cb4d2ce3b5db).

Tracemonkey landing:

http://hg.mozilla.org/mozilla-central/pushloghtml?startdate=2009-05-20+09%3A22%3A05&enddate=2009-05-20+09%3A23

Apologies, but I don't have time for further debug now, and probably won't over the next couple of days. I'm guessing the merge may be heading to 1.9.1 so wanted to raise it now to make you guys aware.
A brief comparison of crash-stack and files changed leads me to believe this is most likely a regression from bug 493657.
Blocks: 493657
Keywords: regression
Flags: blocking1.9.1+
Assignee: general → gal
Priority: -- → P1
Summary: Tracemonkey merge 20th May causes crashes in mailnews xpcshell tests → TM: setting scopeChain to NULL in SynthesizeFrame breaks GetCallObject
Attached patch patch (obsolete) — Splinter Review
Attachment #378722 - Attachment is obsolete: true
Attachment #378729 - Flags: review?(brendan)
Comment on attachment 378729 [details] [diff] [review]
patch with testcase

>diff --git a/js/src/jstracer.cpp b/js/src/jstracer.cpp
>--- a/js/src/jstracer.cpp
>+++ b/js/src/jstracer.cpp
>@@ -1930,24 +1930,46 @@ skip:
>                 /*
>                  * We might return from trace with a different function object, but it still
>                  * has to be the same function (FIXME: bug 471425, eliminate fp->callee).

This comment confuses me -- change function object to callee object, and maybe change "same function" to "same JSFunction"?

>                  */
>                 JS_ASSERT(JSVAL_IS_OBJECT(fp->argv[-1]));
>                 JS_ASSERT(HAS_FUNCTION_CLASS(JSVAL_TO_OBJECT(fp->argv[-2])));
>                 JS_ASSERT(GET_FUNCTION_PRIVATE(cx, JSVAL_TO_OBJECT(fp->argv[-2])) ==
>                           GET_FUNCTION_PRIVATE(cx, fp->callee));
>+                JS_ASSERT(GET_FUNCTION_PRIVATE(cx, fp->callee) == fp->fun);
>                 fp->callee = JSVAL_TO_OBJECT(fp->argv[-2]);

Blank line here, while you are nearby.

r=me with these nits.

/be
Attachment #378729 - Flags: review?(brendan) → review+
http://hg.mozilla.org/tracemonkey/rev/8b95ee49081b
Whiteboard: fixed-in-tracemonkey
Thanks for reporting this so quickly. The stack frame helped a lot.
http://hg.mozilla.org/mozilla-central/rev/8b95ee49081b
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Flags: in-testsuite+
Whiteboard: fixed-in-tracemonkey → [needs 1.9.1 landing] fixed-in-tracemonkey
Target Milestone: --- → mozilla1.9.2a1
http://hg.mozilla.org/releases/mozilla-1.9.1/rev/2a4f5b1dcef7
Keywords: fixed1.9.1
Whiteboard: [needs 1.9.1 landing] fixed-in-tracemonkey → fixed-in-tracemonkey
Marking verified based on all tests passes on trunk and 1.9.1 and no backout so far.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: