Closed Bug 60923 Opened 24 years ago Closed 24 years ago

RegExp() constructor can cause js shell to dump core

Categories

(Core :: JavaScript Engine, defect, P3)

x86
All
defect

Tracking

()

VERIFIED DUPLICATE of bug 57631

People

(Reporter: david, Assigned: rogerl)

Details

(Keywords: crash)

Attachments

(1 file)

Using the standalone js interpreter shell, call the RegExp() constructor
with a regexp string that is not legal.  It causes the interpreter to dump core.

% ./js
js> r = new RegExp("[]") 
Segmentation fault (core dumped)

% ./js
js> r = new RegExp("\d{s}")
Segmentation fault (core dumped)
The correct behavior, by the way, is that the RegExp() constructor should
throw a SyntaxError object, I think.

Note that I've only tested this in the JS shell, not in a browser, so I don't
know if it actually manages to crash mozilla, or just the standalone shell.
Confirming on WinNT. Changing OS to "All"  Will attach stack trace below -
Keywords: crash
OS: Linux → All
Attached file WinNT stack trace -
Dup of 57631 - note this is a debug build issue only.

*** This bug has been marked as a duplicate of 57631 ***
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → DUPLICATE
Marking verified as duplicate -
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: