Closed
Bug 1007383
Opened 10 years ago
Closed 10 years ago
Incomplete console stack traces for asm.js code
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla32
People
(Reporter: azakai, Assigned: luke)
Details
Attachments
(3 files, 1 obsolete file)
414.41 KB,
text/html
|
Details | |
4.96 KB,
patch
|
jandem
:
review+
|
Details | Diff | Splinter Review |
2.25 KB,
patch
|
rcampbell
:
review+
|
Details | Diff | Splinter Review |
The testcase throws an exception. In the console, it shows up ok as uncaught exception: abort() at stackTrace@file:///home/alon/Dev/emscripten/a.html:2328:7 abort@file:///home/alon/Dev/emscripten/a.html:9735:3 enlargeMemory@file:///home/alon/Dev/emscripten/a.html:2347:3 Runtime.dynamicAlloc@file:///home/alon/Dev/emscripten/a.html:1800:159 _sbrk@file:///home/alon/Dev/emscripten/a.html:2702:23 _malloc@file:///home/alon/Dev/emscripten/a.html:7480:21 __Z3f10v [f10()]@file:///home/alon/Dev/emscripten/a.html:6115:11 __Z2f9v [f9()]@file:///home/alon/Dev/emscripten/a.html:6123:2 __Z2f8v [f8()]@file:///home/alon/Dev/emscripten/a.html:6129:2 __Z2f7v [f7()]@file:///home/alon/Dev/emscripten/a.html:6135:2 __Z2f6v [f6()]@file:///home/alon/Dev/emscripten/a.html:6141:2 __Z2f5v [f5()]@file:///home/alon/Dev/emscripten/a.html:6147:2 __Z2f4v [f4()]@file:///home/alon/Dev/emscripten/a.html:6153:2 __Z2f3v [f3()]@file:///home/alon/Dev/emscripten/a.html:6159:2 __Z2f2v [f2()]@file:///home/alon/Dev/emscripten/a.html:6165:2 __Z2f1v [f1()]@file:///home/alon/Dev/emscripten/a.html:6171:2 __Z2f0v [f0()]@file:///home/alon/Dev/emscripten/a.html:6177:2 _main@file:///home/alon/Dev/emscripten/a.html:6185:2 callMain@file:///home/alon/Dev/emscripten/a.html:9626:9 doRun@file:///home/alon/Dev/emscripten/a.html:9683:7 run/<@file:///home/alon/Dev/emscripten/a.html:9695:19 but, the console stack trace, when I click to expand it, shows only Module.printErr() a.html:1245 abort() a.html:9727 enlargeMemory() a.html:2347 Runtime.dynamicAlloc() a.html:1800 _sbrk() a.html:2702 callMain() a.html:9626 doRun() a.html:9683 run/<() So between callMain and _sbrk, there should be lots of functions, but they were ignored.
Assignee | ||
Comment 1•10 years ago
|
||
This may well be an Odin bug; we may not be printing the right function string in a way that throws off the console.log stack-trace parser.
Reporter | ||
Comment 2•10 years ago
|
||
With asm.js disabled, the stack trace shows up ok, and when enabled, exactly the asm frames are lost.
Assignee | ||
Comment 3•10 years ago
|
||
Ahh, so console.log uses JS::DescribeStack which uses a NonBuiltinScriptFrameIter which skips the asm.js frames when asm.js is enabled. I meant to update this one but forgot; shouldn't be too hard.
Component: Developer Tools: Console → JavaScript Engine
Product: Firefox → Core
Assignee | ||
Updated•10 years ago
|
Assignee: nobody → luke
Assignee | ||
Comment 4•10 years ago
|
||
Attachment #8419712 -
Flags: review?(jdemooij)
Assignee | ||
Comment 5•10 years ago
|
||
Ideally, I'd like to add a testcase that verifies that console.error output contains the asm.js frames. Here's a trivial testcase, but I don't know how to test the console.error output. Rob, do you suppose you could point me to a mochitest that I could copy or a person who could help me write such a test?
Flags: needinfo?(rcampbell)
Comment 6•10 years ago
|
||
Comment on attachment 8419712 [details] [diff] [review] fix-stack Review of attachment 8419712 [details] [diff] [review]: ----------------------------------------------------------------- (The commit message appears to be for another bug.) ::: js/src/vm/OldDebugAPI.cpp @@ +904,3 @@ > { > + if (iter.isFunctionFrame()) > + funDisplayName_ = iter.functionDisplayAtom(); Was wondering about initializing funDisplayName_ to nullptr in the non-function case, but it's a Heap<T> so initialized to null. Yay constructors.
Attachment #8419712 -
Flags: review?(jdemooij) → review+
Comment 7•10 years ago
|
||
(In reply to Luke Wagner [:luke] (on partial PTO) from comment #5) > Created attachment 8419715 [details] > test.html > > Ideally, I'd like to add a testcase that verifies that console.error output > contains the asm.js frames. Here's a trivial testcase, but I don't know how > to test the console.error output. Rob, do you suppose you could point me to > a mochitest that I could copy or a person who could help me write such a > test? check http://mxr.mozilla.org/mozilla-central/source/toolkit/devtools/webconsole/test/ e.g., test_consoleapi.html They have some examples for tests of our console API. Front end tests live in browser/devtools/webconsole/test and there are a bunch of them. Grepping for console.error should find you something pertinent. Find me in IRC today if you need some help digging.
Flags: needinfo?(rcampbell)
Assignee | ||
Comment 8•10 years ago
|
||
Thanks, that helps a lot! Can I just add this here?
Attachment #8419715 -
Attachment is obsolete: true
Attachment #8422072 -
Flags: review?(rcampbell)
Comment 9•10 years ago
|
||
(In reply to Luke Wagner [:luke] (on partial PTO) from comment #8) > Created attachment 8422072 [details] [diff] [review] > stack-tests > > Thanks, that helps a lot! Can I just add this here? sure you can!
Updated•10 years ago
|
Attachment #8422072 -
Flags: review?(rcampbell) → review+
Assignee | ||
Comment 10•10 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/ce34c13388f2
Comment 11•10 years ago
|
||
Backed out for crashtest crashes. https://hg.mozilla.org/integration/mozilla-inbound/rev/904012cb4646 https://tbpl.mozilla.org/php/getParsedLog.php?id=39748106&tree=Mozilla-Inbound https://tbpl.mozilla.org/php/getParsedLog.php?id=39747897&tree=Mozilla-Inbound https://tbpl.mozilla.org/php/getParsedLog.php?id=39747932&tree=Mozilla-Inbound
Assignee | ||
Comment 12•10 years ago
|
||
Oops, silly mistake: https://hg.mozilla.org/integration/mozilla-inbound/rev/b8533fbcc811
Comment 13•10 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/b8533fbcc811
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla32
Updated•10 years ago
|
QA Whiteboard: [good first verify]
You need to log in
before you can comment on or make changes to this bug.
Description
•