Closed Bug 976602 Opened 6 years ago Closed 6 years ago

Assertion failure: pod.functionBytes_, at jit/AsmJSModule.h:702

Categories

(Core :: JavaScript Engine: JIT, defect, critical)

x86_64
Linux
defect
Not set
critical

Tracking

()

RESOLVED FIXED
mozilla30
Tracking Status
firefox30 --- fixed

People

(Reporter: decoder, Assigned: luke)

References

(Blocks 1 open bug)

Details

(Keywords: assertion, testcase, Whiteboard: [jsbugmon:update,ignore])

Attachments

(2 files)

The following testcase asserts on mozilla-central revision e3daaa4c73dd (run with --fuzzing-safe):


var self = this;
function myFunc() {
  insideFunc();
  self.outSideFunc = insideFunc;
  function insideFunc() {
        (function() {
            "use asm"
            return {}
        })()
  }
}
myFunc();
outSideFunc();
Whiteboard: [jsbugmon:update,bisect]
Attached patch fix-assertSplinter Review
In this case the assert is overly conservative; it's fine to have functionBytes = 0 (there are no functions).  Rather than depend on the OS to handle the 0-byte code, though, it's probably better than to explicitly avoid calling mprotect in this case and keep the assert.

While doing this, I realized rt->currentThreadOwnsOperationCallbackLock() was missing from unprotectCode().  Adding this pointed out that technically we need AutlLockForOperationCallback from the signal handlers.
Assignee: nobody → luke
Status: NEW → ASSIGNED
Attachment #8381561 - Flags: review?(benj)
Whiteboard: [jsbugmon:update,bisect] → [jsbugmon:update,ignore]
JSBugMon: The testcase found in this bug no longer reproduces (tried revision 22650589a724).
JSBugMon: Bisection requested, result:
=== Tinderbox Build Bisection Results by autoBisect ===

The "good" changeset has the timestamp "20140224093814" and the hash "560957199199".
The "bad" changeset has the timestamp "20140224102415" and the hash "4e7eba19b573".

Likely regression window: https://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?fromchange=560957199199&tochange=4e7eba19b573
Comment on attachment 8381561 [details] [diff] [review]
fix-assert

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

Nice catch! Looks good.
Attachment #8381561 - Flags: review?(benj) → review+
https://hg.mozilla.org/mozilla-central/rev/0aa56e2a5f81
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla30
You need to log in before you can comment on or make changes to this bug.