Closed Bug 365906 Opened 18 years ago Closed 18 years ago

Javascript takes too long to process a regular expression

Categories

(Core :: JavaScript Engine, defect)

1.8 Branch
x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 330569

People

(Reporter: jesus, Unassigned)

Details

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.9) Gecko/20061219 Fedora/1.5.0.9-1.fc6 Firefox/1.5.0.9 pango-text
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.9) Gecko/20061219 Fedora/1.5.0.9-1.fc6 Firefox/1.5.0.9 pango-text

Javascript takes too long to process the following regular expression. Here's a test case:

r = /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/;
r.test("candidate0@blackhole.ijint.lanp");


Reproducible: Always

Steps to Reproduce:
1. Create an empty html file with the test case javascript
Actual Results:  
The regular expression takes too long to test the match.

Expected Results:  
The regular expression test should be faster and not block the browser.

This has been test in: Firefox versions 1.5.0.9 and 2.0.0.1.
Assignee: nobody → general
Component: General → JavaScript Engine
Product: Firefox → Core
QA Contact: general → general
Version: unspecified → 1.8 Branch
Whiteboard: DUPEME
Looks like yet another exponential regex.  Jesse:  Got a favorite to dupe these to?
(In reply to comment #2)
> Bug 330569 or bug 346237?
> 

Bug 330569 it is.  Bug 346237 is seemingly fixed (the original bug, that is) and should be closed out?
Status: UNCONFIRMED → RESOLVED
Closed: 18 years ago
Resolution: --- → DUPLICATE
Whiteboard: DUPEME
You need to log in before you can comment on or make changes to this bug.