Closed
Bug 559438
Opened 15 years ago
Closed 15 years ago
Decompiler bug with CONCATN
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
FIXED
Tracking | Status | |
---|---|---|
status1.9.2 | --- | wanted |
People
(Reporter: jorendorff, Assigned: jorendorff)
References
Details
(Whiteboard: fixed-in-tracemonkey)
Attachments
(2 files)
1.76 KB,
patch
|
shaver
:
review+
|
Details | Diff | Splinter Review |
491 bytes,
text/plain
|
Details |
js> function f() { return "" + 2 + (i + 1); }
js> f
function f() {return "" + 2 + i + 1;}
Note the subtle change in meaning there.
Assignee | ||
Comment 1•15 years ago
|
||
hasenj, the contributor who originally reported this bug, spent days working with me to reduce it from a complex web application.
The initial bug was simply that the former code was mysteriously behaving like the latter. We suspected the interpreter, the tracer, and ultimately the parser before discovering in a marathon gdb session that the code being handed to the JS compiler was actually subtly different from the script on disk.
hasenj ultimately discovered that the application has module-loading code that takes functions, converts them to strings, and passes the strings back to Function by way of eval, or something.
Assignee | ||
Comment 2•15 years ago
|
||
Assignee: general → jorendorff
Attachment #439109 -
Flags: review?(shaver)
Comment 3•15 years ago
|
||
Comment on attachment 439109 [details] [diff] [review]
v1
My bad, I bet. r=shaver
Attachment #439109 -
Flags: review?(shaver) → review+
Comment 4•15 years ago
|
||
There's either a decompilation or extensions directory the test should go in, no?
Comment 5•15 years ago
|
||
Why do we care? We always have to search for them that way (else memorize JS and ECMA version history), and people who want to re-use our test suite can filter out whatever they don't want. This bug affects web content, so they might well want to include it.
Assignee | ||
Comment 6•15 years ago
|
||
http://hg.mozilla.org/tracemonkey/rev/d9e5e022384f
Waldo, r=me to move the test wherever you want, if shaver's argument in comment 5 doesn't satisfy you.
The test is a little different from most decompiler tests in that it's directly testing behavior.
Whiteboard: fixed-in-tracemonkey
Comment 7•15 years ago
|
||
Asserting that we want to fix this compat bug in the next 3.6 update.
status1.9.2:
--- → wanted
(In reply to comment #8)
> http://hg.mozilla.org/mozilla-central/rev/d9e5e022384f
> +function f(x) { return 1 + "" + (x + 1); }
> +reportCompare("12", f(1), "");
> +var g = eval(String(f));
> +reportCompare("12", f(1), "");
Shouldn’t f(1) on the last line be g(1)?
Comment 10•15 years ago
|
||
(In reply to comment #9)
> Shouldn’t f(1) on the last line be g(1)?
Oops, never mind. Now I see how the test works (the eval redefines the function f).
Assignee | ||
Comment 11•15 years ago
|
||
fcp: You're right. peterv noticed this yesterday too, and I changed the test.
Comment 12•15 years ago
|
||
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
![]() |
||
Comment 14•14 years ago
|
||
Jason, we should probably fix this on 1.9.2... This is breaking greasemonkey users there, at least, plus whatever web app you were looking at, right?
blocking1.9.2: --- → ?
Comment 16•14 years ago
|
||
The bug still exists.
I can confirm this error on both 3.6.17 and 4.0.1 (tarball from www.firefox.com) running on Ubuntu 10.04.
Comment 17•14 years ago
|
||
I must have kept open the wrong window, 4.0.1 is fine, only 3.6.17 is affected (and possibly previous versions).
You need to log in
before you can comment on or make changes to this bug.
Description
•