Bug 23063 - [jsfunfuzz] Assertion + incorrect behaviour with dynamically created local variable in a catch block
Summary: [jsfunfuzz] Assertion + incorrect behaviour with dynamically created local va...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac OS X 10.5
: P2 Normal
Assignee: Oliver Hunt
URL:
Keywords:
Depends on:
Blocks: 13638
  Show dependency treegraph
 
Reported: 2008-12-31 22:10 PST by Oliver Hunt
Modified: 2009-01-01 00:23 PST (History)
0 users

See Also:


Attachments
Fix the creation of scopes for catch blocks containing eval (8.54 KB, patch)
2008-12-31 23:54 PST, Oliver Hunt
zwarich: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Oliver Hunt 2008-12-31 22:10:50 PST
try { throw ""; } catch(e) { eval("var x=1"); }

This throws, because the eval code attempts to insert a dynamic property onto the catch blocks scope object.  but the catch block has a static scope node so cannot receive new properties.
Comment 1 Oliver Hunt 2008-12-31 23:54:31 PST
Created attachment 26344 [details]
Fix the creation of scopes for catch blocks containing eval

Fixeration
Comment 2 Cameron Zwarich (cpst) 2009-01-01 00:16:17 PST
Comment on attachment 26344 [details]
Fix the creation of scopes for catch blocks containing eval

You have a typo in your ChangeLog. It should be

the catch block's static scope

rather than

the catch blocks static scope. You should also put the bool after the pointer member variables in the class definition.

Other than that, r=me.
Comment 3 Oliver Hunt 2009-01-01 00:23:35 PST
Committing to http://svn.webkit.org/repository/webkit/trunk ...
	M	JavaScriptCore/ChangeLog
	M	JavaScriptCore/parser/Grammar.y
	M	JavaScriptCore/parser/Nodes.cpp
	M	JavaScriptCore/parser/Nodes.h
	M	LayoutTests/ChangeLog
	M	LayoutTests/fast/js/eval-var-decl-expected.txt
	M	LayoutTests/fast/js/resources/eval-var-decl.js
Committed r39534