Browser hangs when running a specific regular expression

RESOLVED INVALID

Status

()

Core
JavaScript Engine
--
major
RESOLVED INVALID
12 years ago
11 years ago

People

(Reporter: i-senso, Unassigned)

Tracking

({hang, testcase})

Trunk
hang, testcase
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(1 attachment)

(Reporter)

Description

12 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.6) Gecko/20060728 Firefox/1.5.0.6
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.6) Gecko/20060728 Firefox/1.5.0.6

When running a specific regexp against a specific text (see the example I gave), the browser seems to enter an infinite loop.
Notice that the same Regexp against other text, runs as expected.

Please contact me if I can help further.

Reproducible: Always

Steps to Reproduce:
1. Goto http://www.i-senso.com/ff-rx-bug.html;
2. Press GO, to execute the script that uses the regexp;
3. The scripts enters some kind of infinite loop.

Actual Results:  
The script never finishes. The browser locks.

Expected Results:  
The browser should enter some kind of infinite loop.

Run the regexp and stop running.
Created attachment 234263 [details]
testcase from reporter's URL

Updated

12 years ago
Keywords: hang, testcase
I see the hang with
Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8.1b1) Gecko/20060817 BonEcho/2.0b1 ID:2006081703
and
Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9a1) Gecko/20060816 Minefield/3.0a1
too.
Severity: normal → major
Version: unspecified → Trunk

Updated

12 years ago
Assignee: nobody → general
Component: General → JavaScript Engine
Product: Firefox → Core
QA Contact: general → general

Comment 3

11 years ago
This is simply a geometrically complex regular expression (worse than O(n^3)).  Using javascript.options.relimit = true in about:config will save you from it (ie., it will throw an exception)
Status: UNCONFIRMED → RESOLVED
Last Resolved: 11 years ago
OS: Windows XP → All
Hardware: PC → All
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.