Last Comment Bug 679936 - Firefox 6 breaks simple jQuery v1.4.2 selectors (regular expression too complex)
: Firefox 6 breaks simple jQuery v1.4.2 selectors (regular expression too complex)
Status: RESOLVED WORKSFORME
: regression
Product: Core
Classification: Components
Component: JavaScript Engine (show other bugs)
: 6 Branch
: x86_64 Windows 7
: -- normal (vote)
: ---
Assigned To: general
:
Mentors:
Depends on:
Blocks: 625600
  Show dependency treegraph
 
Reported: 2011-08-17 16:50 PDT by Nicholas Carey
Modified: 2013-06-13 15:05 PDT (History)
9 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---
+
wontfix
+
fixed


Attachments
error details and failing javascript code with context. (2.06 KB, text/plain)
2011-08-17 16:51 PDT, Nicholas Carey
no flags Details
testcase with jquery 1.6.2 (333 bytes, text/html)
2011-09-06 15:53 PDT, j.j.
no flags Details

Description Nicholas Carey 2011-08-17 16:50:25 PDT
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.
Comment 1 Nicholas Carey 2011-08-17 16:51:39 PDT
Created attachment 553957 [details]
error details and failing javascript code with context.
Comment 2 Marcia Knous [:marcia - use ni] 2011-08-17 17:13:24 PDT
Nicholas: Can you provide the URL to the page?
Comment 3 j.j. 2011-08-17 20:17:19 PDT
Looks like a dup of bug 625600.
It's not clear to me in which version that bug is fixed.
Comment 4 (mostly gone) XtC4UaLL [:xtc4uall] 2011-08-18 15:51:27 PDT
(In reply to j.j. from comment #3)
8.0 as it seems.
Comment 5 Boris Zbarsky [:bz] 2011-08-25 13:48:38 PDT
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...
Comment 6 j.j. 2011-09-01 02:54:58 PDT
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?
Comment 7 David Mandelin [:dmandelin] 2011-09-01 16:50:40 PDT
(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.
Comment 8 Johnathan Nightingale [:johnath] 2011-09-06 14:35:36 PDT
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?
Comment 9 David Mandelin [:dmandelin] 2011-09-06 15:14:36 PDT
(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 j.j. 2011-09-06 15:53:26 PDT
Created attachment 558650 [details]
testcase with jquery 1.6.2

with code from comment 0
Comment 11 j.j. 2011-09-06 16:05:44 PDT
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
Comment 12 j.j. 2013-06-13 15:05:09 PDT
(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

Note You need to log in before you can comment on or make changes to this bug.