Closed
Bug 66234
Opened 24 years ago
Closed 24 years ago
[meta] Combining Regular Expression bugs
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
VERIFIED
FIXED
People
(Reporter: rogerl, Assigned: rogerl)
References
Details
(Keywords: js1.5, meta)
Attachments
(3 files)
(deleted),
patch
|
Details | Diff | Splinter Review | |
(deleted),
patch
|
Details | Diff | Splinter Review | |
(deleted),
patch
|
Details | Diff | Splinter Review |
This is a bug to capture the current Reg. Exp. bugs & proposed patch rather than
having to update it in all the various locations.
Assignee | ||
Updated•24 years ago
|
Assignee | ||
Comment 1•24 years ago
|
||
Updated•24 years ago
|
Keywords: js1.5,
mozilla0.8
Assignee | ||
Comment 3•24 years ago
|
||
Assignee | ||
Comment 4•24 years ago
|
||
Comment 5•24 years ago
|
||
rval = POP_OPND();
if (JSVAL_IS_PRIMITIVE(rval)) {
+ str = js_DecompileValueGenerator(cx, -1, rval, NULL);
Use 0, not -1, since you just popped rval (stack grows upward, pops downward, so
it's now at sp[0], not sp[-1]). Wait, that won't work: 0 is JSDVG_IGNORE_STACK,
only negative indexes cause js_DecompileValueGenerator to load an operand and
its generating pc. Ok, do this:
rval = FETCH_OPND(-1);
if (JSVAL_IS_PRIMITIVE(rval)) {
+ str = js_DecompileValueGenerator(cx, -1, rval, NULL);
+ if (str) {
JS_ReportErrorNumber(cx, js_GetErrorMessage, NULL,
- JSMSG_IN_NOT_OBJECT);
+ JSMSG_IN_NOT_OBJECT,
+ JS_GetStringBytes(str));
+ }
ok = JS_FALSE;
goto out;
}
+ sp--;
Note the sp--; after the error check. Fix this, and sr=brendan@mozilla.org.
/be
Comment 6•24 years ago
|
||
And pls. test in the JS shell that the error report for an invalid 'in' operator
is what you expect. Try all cases for the 'in' operator that make sense. Here
is a template for 'instanceof' that covers the various decompiler cases:
var o = {}, O = {P:1};
o instanceof 3;
o instanceof O;
o instanceof Object;
o instanceof O.P;
var id = 'P';
o instanceof O[id];
/be
Assignee | ||
Comment 7•24 years ago
|
||
Fix checked in.
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Comment 8•24 years ago
|
||
Verified Fixed - ran this test suite directory on Linux, WinNT, and Mac
js/tests/ecma_3/RegExp/
with both debug and optimized versions of the JS shell, and got 0 errors.
Status: RESOLVED → VERIFIED
Updated•24 years ago
|
Keywords: mozilla0.8
You need to log in
before you can comment on or make changes to this bug.
Description
•