WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
18649
SQUIRRELFISH: correctly handle exceptions in eval code
https://bugs.webkit.org/show_bug.cgi?id=18649
Summary
SQUIRRELFISH: correctly handle exceptions in eval code
Cameron Zwarich (cpst)
Reported
2008-04-20 18:27:10 PDT
Exceptions are broken in eval code. This leads to assertion failures of the following form when running JavaScriptCore tests: ASSERTION FAILED: it != end (./VM/Machine.cpp:431 bool KJS::Machine::unwindCallFrame(KJS::Register**, const KJS::Instruction*&, KJS::CodeBlock*&, KJS::JSValue**&, KJS::ScopeChainNode*&, KJS::Register*&)) ASSERTION FAILED: addressOffset < instructions.size() (/Users/Cameron/sf/JavaScriptCore/VM/CodeBlock.cpp:541 bool KJS::CodeBlock::getHandlerForVPC(const KJS::Instruction*, KJS::Instruction*&, int&))
Attachments
Make eval setup a "native" callframe
(1.71 KB, patch)
2008-04-21 17:16 PDT
,
Oliver Hunt
ggaren
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Cameron Zwarich (cpst)
Comment 1
2008-04-20 19:13:59 PDT
The it != end assertion failure is hit when throwing an exception from eval in a global context. Global code is a special case at the beginning, because no unwind is necessary, and the rest of the function deals with the case of function code. If the eval is in a global context, then the end of the scope chain is also the top, hitting the assertion. The addressOffset < instructions.size() assertion failure is hit when throwing an exception from eval in a function context. The top of the scope chain is an activation object, so Machine::unwindCallFrame() thinks it has succeeded when it really hasn't, passing the buck onto CodeBlock::getHandlerForVPC().
Oliver Hunt
Comment 2
2008-04-21 11:55:32 PDT
Partial fix Committed
r32331
Oliver Hunt
Comment 3
2008-04-21 17:16:48 PDT
Created
attachment 20743
[details]
Make eval setup a "native" callframe
Geoffrey Garen
Comment 4
2008-04-21 17:23:44 PDT
Comment on
attachment 20743
[details]
Make eval setup a "native" callframe Need to fix the other eval case. Otherwise, code looks good. Clearing review flag.
Geoffrey Garen
Comment 5
2008-04-21 17:26:47 PDT
Comment on
attachment 20743
[details]
Make eval setup a "native" callframe Sorry, the second version just calls the first, so this looks good.
Oliver Hunt
Comment 6
2008-04-21 17:45:33 PDT
Committed
r32361
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug