Closed
Bug 1271857
Opened 9 years ago
Closed 9 years ago
Assertion failure: len != 0, at js/src/builtin/RegExp.cpp:1478
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
FIXED
mozilla49
Tracking | Status | |
---|---|---|
firefox49 | --- | fixed |
People
(Reporter: gkw, Assigned: arai)
References
Details
(Keywords: assertion, testcase, Whiteboard: [fuzzblocker] [jsbugmon:])
Attachments
(2 files)
30.67 KB,
text/plain
|
Details | |
1.43 KB,
patch
|
h4writer
:
review+
|
Details | Diff | Splinter Review |
The following testcase crashes on mozilla-central revision 1579b9e2e50f (build with --enable-debug --enable-more-deterministic, run with --fuzzing-safe --no-threads --ion-eager --ion-limit-script-size=off):
setJitCompilerOption("ion.forceinlineCaches", 1);
for (var i = 0; i < 1; i++) {
var text = "function (){}";
text.replace(/x/, "12")
text.replace(/y/, "")
}
Backtrace:
0 js-dbg-64-dm-clang-darwin-1579b9e2e50f 0x0000000104b59668 js::GetFirstDollarIndexRawFlat(JSLinearString*) + 248 (RegExp.cpp:1478)
1 js-dbg-64-dm-clang-darwin-1579b9e2e50f 0x0000000104ee6927 js::jit::MGetFirstDollarIndex::foldsTo(js::jit::TempAllocator&) + 87 (Value.h:776)
2 js-dbg-64-dm-clang-darwin-1579b9e2e50f 0x0000000104ffa824 js::jit::ValueNumberer::visitDefinition(js::jit::MDefinition*) + 372 (ValueNumbering.cpp:618)
3 js-dbg-64-dm-clang-darwin-1579b9e2e50f 0x0000000104ffb875 js::jit::ValueNumberer::visitBlock(js::jit::MBasicBlock*, js::jit::MBasicBlock const*) + 469 (ValueNumbering.cpp:989)
4 js-dbg-64-dm-clang-darwin-1579b9e2e50f 0x0000000104ffbb0b js::jit::ValueNumberer::visitDominatorTree(js::jit::MBasicBlock*) + 315 (ValueNumbering.cpp:1032)
For detailed crash information, see attachment.
Recent RegExp bugs have been s-s so I'm treating this no different pending further analysis.
![]() |
Reporter | |
Comment 1•9 years ago
|
||
![]() |
Reporter | |
Comment 2•9 years ago
|
||
autoBisect shows this is probably related to the following changeset:
The first bad revision is:
changeset: https://hg.mozilla.org/mozilla-central/rev/d1b90728ce14
user: Tooru Fujisawa
date: Mon May 09 20:48:26 2016 +0900
summary: Bug 1108382 - Remove non-standard flag argument from String.prototype.{search,match,replace}. r=till
Arai-san, is bug 1108382 a likely regressor?
Also, this is happening regularly within jsfunfuzz itself, so setting [fuzzblocker].
Blocks: 1108382
Flags: needinfo?(arai.unmht)
Whiteboard: [jsbugmon:update] → [fuzzblocker][jsbugmon:update]
Updated•9 years ago
|
Whiteboard: [fuzzblocker][jsbugmon:update] → [fuzzblocker] [jsbugmon:]
Comment 3•9 years ago
|
||
JSBugMon: Cannot process bug: Unable to automatically reproduce, please track manually.
![]() |
Reporter | |
Comment 4•9 years ago
|
||
Note that this testcase seems to require --ion-limit-script-size=off.
Assignee | ||
Comment 5•9 years ago
|
||
Thank you :)
this is a regression from bug 1263490.
Looks like, the constant folding happens with empty string, where constant empty string won't cause it in normal case.
Anyway, the assertion is just for performance reason, to avoid calling native function from JS code in unnecessary case, and failing the assertion doesn't mean any security flaw.
We can move the assertion to js::GetFirstDollarIndex from js::GetFirstDollarIndexRawFlat, as js::GetFirstDollarIndexRawFlat is used also from constant folding but js::GetFirstDollarIndex is called only from JS code.
Flags: needinfo?(arai.unmht)
See Also: → 1263490
Assignee | ||
Updated•9 years ago
|
Assignee | ||
Comment 6•9 years ago
|
||
Just moved the assertion to the entry point for self-hosting intrinsic.
Assignee: nobody → arai.unmht
Attachment #8751053 -
Flags: review?(hv1989)
![]() |
Reporter | |
Comment 7•9 years ago
|
||
(In reply to Tooru Fujisawa [:arai] from comment #5)
> Anyway, the assertion is just for performance reason, to avoid calling
> native function from JS code in unnecessary case, and failing the assertion
> doesn't mean any security flaw.
Opening up.
Group: javascript-core-security
Updated•9 years ago
|
Attachment #8751053 -
Flags: review?(hv1989) → review+
Assignee | ||
Comment 8•9 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/71fd71704676df43d1f373be32394ae56fd6258b
Bug 1271857 - Move the assertion for text length from GetFirstDollarIndexRawFlat to GetFirstDollarIndex. r=h4writer
Comment 9•9 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla49
You need to log in
before you can comment on or make changes to this bug.
Description
•