Firefox 6 breaks simple jQuery v1.4.2 selectors (regular expression too complex)

RESOLVED WORKSFORME

Status

()

Core
JavaScript Engine
RESOLVED WORKSFORME
6 years ago
4 years ago

People

(Reporter: Nicholas Carey, Unassigned)

Tracking

({regression})

6 Branch
x86_64
Windows 7
regression
Points:
---

Firefox Tracking Flags

(firefox7+ wontfix, firefox8+ fixed)

Details

Attachments

(2 attachments)

(Reporter)

Description

6 years ago
After upgrading to Firefox 6.0, an existing web page that works perfectly fine under Firefox 5.x and recent/latest builds of Safari, Chrome and IE 9 is suddenly throwing a javascript error ("regular expression too complex"). It should be noted that the page in question uses jQuery v1.4.2.

The error occurs whilst wiring up a change event in the jQuery page initialization event, and has to do with the selector being used that selects the elements upon which to act. The offending selector is

  $('div#Q08AddDialog input:radio[name=Q07Gender], div#Q08AddDialog select[name=Q07CancerType')

It should be noted that this is not a terribly complex selector.

See the attached file for error details from Firebug, including the stack trace, and for the failing source code with context.
(Reporter)

Comment 1

6 years ago
Created attachment 553957 [details]
error details and failing javascript code with context.
Nicholas: Can you provide the URL to the page?

Comment 3

6 years ago
Looks like a dup of bug 625600.
It's not clear to me in which version that bug is fixed.

Updated

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

Updated

6 years ago
Summary: Firefox 6 breaks simple jQuery v1.4.2 selectors → Firefox 6 breaks simple jQuery v1.4.2 selectors (regular expression too complex)
(In reply to j.j. from comment #3)
8.0 as it seems.
Bug 625600 won't be fixed until Firefox 8 if I read things right (too bad it has no target milestone set).

Can we do anything with this bug before then?

I did check that I see the problem on Firefox 6 and don't see it on current trunk, so I assume bug 625600 in fact fixed this...

Updated

6 years ago
Blocks: 625600

Comment 6

6 years ago
tracking-firefox7 ?
See dups and dependencies of bug 625600.
We let people run into these bugs in Fx7 with eyes open. Should this really happen?
tracking-firefox7: --- → ?
Keywords: regression
(In reply to j.j. from comment #6)
> tracking-firefox7 ?
> See dups and dependencies of bug 625600.
> We let people run into these bugs in Fx7 with eyes open. Should this really
> happen?

Sorry about this. We certainly don't want it to happen.

I don't know if we can do anything about it at this point. We could theoretically backport the Yarr refresh to Firefox 7, but that would be the Beta channel--it would be very unusual to backport a patch like that to Beta, and I don't recommend it.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Discussed in triage today - marking tracking-firefox7 and 8.

Dave:

- is there anything we can safely do in 7? Is cherry picking the yarr fix that touched this at all worthwhile/safe?

Dave/jj:
- Is it accurate to mark this status-firefox8: fixed?
status-firefox8: --- → fixed
tracking-firefox7: ? → +
tracking-firefox8: --- → +
(In reply to Johnathan Nightingale [:johnath] from comment #8)
> Discussed in triage today - marking tracking-firefox7 and 8.
> 
> Dave:
> 
> - is there anything we can safely do in 7? Is cherry picking the yarr fix
> that touched this at all worthwhile/safe?

That fix was the refresh of Yarr to a later version. It's a pretty big change: that version of Yarr has several bug fixes and optimizations, and wholly replaces PCRE with yarr-interpreter. I also redid the adaptation of Yarr to our code for the refresh.

In terms of risks and benefits, it's about the same as what we have in Fx8/9 now. There are some known bugs in that version of Yarr, which may or may not have been present in the previous version. Compatibility seems to be much better, so far.

> Dave/jj:
> - Is it accurate to mark this status-firefox8: fixed?

What I know is that bug 625600 is landed on mozilla-aurora.

Comment 10

6 years ago
Created attachment 558650 [details]
testcase with jquery 1.6.2

with code from comment 0

Comment 11

6 years ago
Mozilla/5.0 (Windows NT 5.1; rv:5.0) Gecko/20100101 Firefox/5.0

I get the "regular expression too complex" message in Fx6 and Fx5 also.
Is this actually a regression from 5.0, as stated in comment 0?
Or just another dup of bug 625600?

No such error message in 8

Updated

6 years ago
Attachment #558650 - Attachment description: testcas with jquery 1.6.2 → testcase with jquery 1.6.2
status-firefox7: --- → wontfix

Comment 12

4 years ago
(In reply to j.j. (mostly inactive in 2013, too) from comment #11)
 
> I get the "regular expression too complex" message in Fx6 and Fx5 also.
> Is this actually a regression from 5.0, as stated in comment 0?
> Or just another dup of bug 625600?
> 
> No such error message in 8

Mozilla/5.0 (Windows NT 5.1; rv:21.0) Gecko/20100101 Firefox/21.0
-> WORKSFORME
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.