Closed
Bug 494343
Opened 15 years ago
Closed 15 years ago
nanojit: bad assertion in LirBufWriter::ensureRoom()
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 494639
People
(Reporter: n.nethercote, Assigned: n.nethercote)
References
Details
(Whiteboard: fixed-in-tracemonkey)
Attachments
(1 file, 1 obsolete file)
712 bytes,
patch
|
Details | Diff | Splinter Review |
Comment 8 of bug 494084 has the details. (Sorry, I should have just started this bug rather than writing that comment in that old bug.) Attached patch is a fix.
Attachment #379054 -
Flags: review?(graydon)
Comment 1•15 years ago
|
||
Comment on attachment 379054 [details] [diff] [review]
patch fixing assertion
Obvious thinko, thanks.
Attachment #379054 -
Flags: review?(graydon) → review+
Comment 2•15 years ago
|
||
Comment on attachment 379054 [details] [diff] [review]
patch fixing assertion
Hah. As proposed, this doesn't actually work either because of the rounding up to the next LIns boundary performed in insSkip. MAX_SKIP_BYTES is 3996, insSkip rounds up to 4000 bytes (250 slots), adds 1, passes 251 to ensureRoom, which then multiplies that out to 4016 bytes required. But the limit you propose is only 4012 bytes. So it still traps.
Hilarity.
Attachment #379054 -
Flags: review+ → review-
Comment 3•15 years ago
|
||
Attachment #379054 -
Attachment is obsolete: true
Attachment #379208 -
Flags: review?(nnethercote)
Comment 4•15 years ago
|
||
Or .. perhaps 2*sizeof(LIns), since we don't want to land on the page-edge? God, what a mess.
Assignee | ||
Comment 5•15 years ago
|
||
Comment on attachment 379208 [details] [diff] [review]
another stab at it
What's wrong with this sentence?
MAX_SKIP_BYTES is 3996, insSkip rounds up to 4000 bytes (250 slots)
Er... so we round the size up to something greater than MAX_SKIP_BYTES! That's
bad. I think we avoid this problem if we ensure MAX_SKIP_BYTES is a multiple
of sizeof(LIns), eg. 4000; this could be tested via an assertion in
insSkip(). I'll work up an alternative patch on Monday (it's Saturday
morning here for me now).
I consider this mistake another argument in favour of doing our accounting
entirely in bytes (bug 494357) -- I think the problem would have been easier
to see that way. And maybe bug 494358 will help when I get to that.
Assignee | ||
Comment 6•15 years ago
|
||
I failed to say -- if MAX_SKIP_BYTES is a multiple of sizeof(LIns), I think my original patch is correct. But I'll recheck that on Monday.
Assignee | ||
Comment 7•15 years ago
|
||
This will be easier to fix alongside various other changes, as part of bug 494639. If we need a temporary workaround, we could just remove the assertion.
Comment 8•15 years ago
|
||
Actually I removed this assert with the lirasm patch in bug 484142, so I think this is no longer relevant.
(Also I'll be landing your bug 494639 work later today, as a final nail in this particular coffin).
Whiteboard: fixed-in-tracemonkey
Assignee | ||
Comment 9•15 years ago
|
||
I agree it's no longer relevant. I'll mark it as a dup of bug 494639, since that also (would have) fixed it and is more related to this than bug 484142.
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → DUPLICATE
Updated•15 years ago
|
Attachment #379208 -
Flags: review?(nnethercote)
You need to log in
before you can comment on or make changes to this bug.
Description
•