Closed
Bug 494544
Opened 16 years ago
Closed 15 years ago
Uninitialized variable undefined after assignment whose initializer is a closure capturing that var
Categories
(Core :: JavaScript Engine, defect, P1)
Core
JavaScript Engine
Tracking
()
VERIFIED
FIXED
mozilla1.9.2a1
People
(Reporter: Mardak, Assigned: brendan)
References
()
Details
(Keywords: verified1.9.1, Whiteboard: fixed-in-tracemonkey)
Attachments
(1 file, 2 obsolete files)
1.03 KB,
patch
|
brendan
:
review+
|
Details | Diff | Splinter Review |
I'm getting some strange behavior when I use a <script> tag with version=1.8 but running the code in the command line shell, it works fine.
data:text/html,<script type="text/javascript;version=1.8">
let (foo) {
foo = { get bar() foo };
alert([typeof foo, typeof foo.bar])
}</script>
In the shell I get "object, object" but in the browser I get "object, undefined".
It seems to be triggered by the lack of assignment because when I do..
let (foo = 0) {
everything is happy.
Assignee | ||
Comment 1•16 years ago
|
||
See also bug 494518.
Assignee | ||
Updated•16 years ago
|
Assignee | ||
Updated•16 years ago
|
Flags: blocking1.9.1?
Reporter | ||
Comment 2•16 years ago
|
||
This started showing up on 0521 trunk builds:
http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=0f4de606acd7&tochange=d0ae0b099a40
Reporter | ||
Comment 3•16 years ago
|
||
And on 0522 1.9.1 builds:
http://hg.mozilla.org/releases/mozilla-1.9.1/pushloghtml?fromchange=f9fdf276d414&tochange=213e1980f998
Assignee | ||
Comment 4•16 years ago
|
||
This links the blocking chain up correctly. The primal sin is the optimization of an uninitialized declaration, followed in the same block by an assignment whose lvalue is the first use of the decl's def, to be equated to an initialized decl.
Since we use source coordinates in judging dominance, the assignment imputed as an initialization has to be "covered" by the start/end position of the decl, in order to include the rvalue (the right-hand side of the assignment, which could contain the closure whose upvar refers to the decl -- foo in this case).
Patch shortly, need to figure out how to get this right without losing the safe optimization.
This should block 1.9.1.
/be
Assignee | ||
Comment 5•16 years ago
|
||
Attachment #379318 -
Flags: review?(mrbkap)
Comment 6•16 years ago
|
||
Applied patch and getting a segfault on start :
./run-mozilla.sh: line 131: 18597 Segmentation fault "$prog" ${1+"$@"}
Comment 7•16 years ago
|
||
Can you get a stack? It's probably something small, given the size of the patch. :)
Assignee | ||
Comment 8•16 years ago
|
||
Frederic: My firefox build started, but perhaps you have an extension I don't. I'd love to see a stack from your crash; if you can use -g to debug, find me on IRC while in gdb -- even better. And please try this patch, it may fix whatever it was that caused the crash you saw.
/be
Attachment #379318 -
Attachment is obsolete: true
Attachment #379357 -
Flags: review?(mrbkap)
Attachment #379318 -
Flags: review?(mrbkap)
Assignee | ||
Updated•16 years ago
|
Flags: in-testsuite?
Comment 9•16 years ago
|
||
Here is my crash with first fix :
./run-mozilla.sh -g ./firefox-bin
MOZILLA_FIVE_HOME=.
LD_LIBRARY_PATH=.:./plugins:.
DISPLAY=:0.0
DYLD_LIBRARY_PATH=.:.
LIBRARY_PATH=.:./components:.
SHLIB_PATH=.:.
LIBPATH=.:.
ADDON_PATH=.
MOZ_PROGRAM=./firefox-bin
MOZ_TOOLKIT=
moz_debug=1
moz_debugger=
which: no ddd in (/bin:/usr/bin:/sbin:/usr/sbin:/usr/bin/perlbin/site:/usr/bin/perlbin/vendor:/usr/bin/perlbin/core:/usr/local/bin)
/usr/bin/gdb ./firefox-bin -x /tmp/mozargs.QsUG6N
GNU gdb 6.8
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-unknown-linux-gnu"...
(no debugging symbols found)
(gdb) run
Starting program: /home/fred/logs/fox/objdir-fx/dist/bin/firefox-bin
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
---Type <return> to continue, or q <return> to quit---
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
---Type <return> to continue, or q <return> to quit---
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[New Thread 0x7fac84c28760 (LWP 12265)]
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
---Type <return> to continue, or q <return> to quit---
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
---Type <return> to continue, or q <return> to quit---
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[New Thread 0x7fac749ff910 (LWP 12268)]
[New Thread 0x7fac741fe910 (LWP 12269)]
[New Thread 0x7fac739fd910 (LWP 12270)]
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[New Thread 0x7fac710fd910 (LWP 12271)]
[Thread 0x7fac710fd910 (LWP 12271) exited]
[New Thread 0x7fac710fd910 (LWP 12272)]
[Thread 0x7fac741fe910 (LWP 12269) exited]
---Type <return> to continue, or q <return> to quit---
(no debugging symbols found)
[Thread 0x7fac710fd910 (LWP 12272) exited]
[Thread 0x7fac739fd910 (LWP 12270) exited]
[Thread 0x7fac749ff910 (LWP 12268) exited]
[New process 12265]
Executing new program: /home/fred/logs/fox/objdir-fx/dist/bin/firefox-bin
(no debugging symbols found)
warning: Cannot initialize thread debugging library: generic error
(no debugging symbols found)
[New process 12265]
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
---Type <return> to continue, or q <return> to quit---
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
---Type <return> to continue, or q <return> to quit---
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
./run-mozilla.sh: line 182: 12264 Erreur de segmentation $debugger "$prog" -x $tmpfile
Will try fix2 asap.
Comment 10•16 years ago
|
||
Forgot to add : no extensions at all.
Assignee | ||
Updated•16 years ago
|
Summary: Unassigned let block variables are undefined after assignment for <script> code → Uninitialized variable undefined after assignment whose initializer is a closure capturing that var
Comment 11•16 years ago
|
||
With 2nd fix, I can make firefox - debug build - run. Weird.
Anyway, here is the log I have :
./run-mozilla.sh -g ./firefox-bin
MOZILLA_FIVE_HOME=.
LD_LIBRARY_PATH=.:./plugins:.
DISPLAY=:0.0
DYLD_LIBRARY_PATH=.:.
LIBRARY_PATH=.:./components:.
SHLIB_PATH=.:.
LIBPATH=.:.
ADDON_PATH=.
MOZ_PROGRAM=./firefox-bin
MOZ_TOOLKIT=
moz_debug=1
moz_debugger=
which: no ddd in (/bin:/usr/bin:/sbin:/usr/sbin:/usr/bin/perlbin/site:/usr/bin/perlbin/vendor:/usr/bin/perlbin/core:/usr/local/bin)
/usr/bin/gdb ./firefox-bin -x /tmp/mozargs.EMcXhl
GNU gdb 6.8
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-unknown-linux-gnu"...
(no debugging symbols found)
(gdb)
(gdb) run
Starting program: /home/fred/logs/fox/objdir-fx/dist/bin/firefox-bin
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
---Type <return> to continue, or q <return> to quit---
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
---Type <return> to continue, or q <return> to quit---
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[New Thread 0x7ff500335760 (LWP 21399)]
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
---Type <return> to continue, or q <return> to quit---
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
---Type <return> to continue, or q <return> to quit---
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[New Thread 0x7ff4f00ff910 (LWP 21402)]
[New Thread 0x7ff4ef8fe910 (LWP 21403)]
[New Thread 0x7ff4ef0fd910 (LWP 21404)]
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[New Thread 0x7ff4ec7fd910 (LWP 21405)]
[Thread 0x7ff4ec7fd910 (LWP 21405) exited]
[New Thread 0x7ff4ec7fd910 (LWP 21406)]
[Thread 0x7ff4ef8fe910 (LWP 21403) exited]
---Type <return> to continue, or q <return> to quit---
(no debugging symbols found)
[Thread 0x7ff4ec7fd910 (LWP 21406) exited]
[Thread 0x7ff4ef0fd910 (LWP 21404) exited]
[Thread 0x7ff4f00ff910 (LWP 21402) exited]
[New process 21399]
Executing new program: /home/fred/logs/fox/objdir-fx/dist/bin/firefox-bin
(no debugging symbols found)
warning: Cannot initialize thread debugging library: generic error
(no debugging symbols found)
[New process 21399]
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
---Type <return> to continue, or q <return> to quit---
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
---Type <return> to continue, or q <return> to quit---
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
./run-mozilla.sh: line 182: 21398 Erreur de segmentation $debugger "$prog" -x $tmpfile
Updated•16 years ago
|
Attachment #379357 -
Flags: review?(mrbkap) → review+
Assignee | ||
Comment 12•16 years ago
|
||
Carrying over r+.
/be
Attachment #379357 -
Attachment is obsolete: true
Attachment #379360 -
Flags: review+
Assignee | ||
Comment 13•16 years ago
|
||
Whiteboard: fixed-in-tracemonkey
Updated•16 years ago
|
Flags: blocking1.9.1? → blocking1.9.1+
Comment 15•15 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Comment 16•15 years ago
|
||
Verified fixed on trunk with builds on all platforms like Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.2a1pre) Gecko/20090525 Minefield/3.6a1pre ID:20090525031110
Status: RESOLVED → VERIFIED
Target Milestone: mozilla1.9.1 → mozilla1.9.2a1
Comment 17•15 years ago
|
||
Hope this is helpful! As I've just commented on Bug #494199, I'm still seeing, in Seamonkey latest nightly, the Yahoo mail problem of selected categories being highlighted but not opening.
Comment 18•15 years ago
|
||
Keywords: fixed1.9.1
Comment 19•15 years ago
|
||
Fixed in latest hourly. Great work.
Comment 20•15 years ago
|
||
Verified fixed on 1.9.1 with builds on all platforms like: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1pre) Gecko/20090601 Shiretoko/3.5pre ID:20090601031153
Keywords: fixed1.9.1 → verified1.9.1
You need to log in
before you can comment on or make changes to this bug.
Description
•