Closed Bug 493625 Opened 15 years ago Closed 15 years ago

The same regexp matching code gives different results depending on whether a line "window;" is commented out or not.

Categories

(Core :: JavaScript Engine, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 493466

People

(Reporter: mj, Unassigned)

References

()

Details

(Keywords: qawanted)

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2a1pre) Gecko/20090517 Minefield/3.6a1pre
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2a1pre) Gecko/20090517 Minefield/3.6a1pre

There are two files, pass.html and fail.html

Both of these files should show a textarea with "true" or "false".

The right answer is "true".

The only difference between the two files is that the "window;" line is 
commented out in fail.html.  I assume this reference to window prevents some 
kind of optimization from happening, causing pass.html to work where fail.html 
doesn't.

Reproducible: Always

Steps to Reproduce:
Load http://inimino.org/~inimino/tests/js/firefox/re/001/pass.html and http://inimino.org/~inimino/tests/js/firefox/re/001/fail.html
Actual Results:  
pass.html says "true" and fail.html says "false"

Expected Results:  
Both should say "true".
Attached file Testcase from website
I see this on the trunk, not a problem on 1.9.1 using Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1b5pre) Gecko/20090518 Shiretoko/3.5b5pre
Status: UNCONFIRMED → NEW
Ever confirmed: true
Version: unspecified → Trunk
a regression range would be great
Keywords: qawanted
The 'window;' line might stop a trace from being recorded. I noticed there is a lot of upvar action in that code; I changed that recently and there is a known flaw in the design (see bug 493512). I will look into this.
This was introduced by:

changeset:   28181:010768e6119c
user:        Brendan Eich <brendan@mozilla.org>
date:        Wed May 13 23:01:08 2009 -0700
summary:     Bug 492914 - TM: trace aborts due to flat closure analysis bug (r=mrbkap).

which is a 1-line patch to jsparse.cpp:2297:

-  outer_dn->pn_dflags |= (dn->pn_dflags & ~PND_PLACEHOLDER);
+  outer_dn->pn_dflags |= dn->pn_dflags & ~(PND_FORWARD | PND_PLACEHOLDER);
This bug has the same cause as bug 493466.
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: