Bug 128560 - Fail FTL compilation if the required stack is too big
Summary: Fail FTL compilation if the required stack is too big
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Michael Saboff
URL:
Keywords:
Depends on:
Blocks: 125650
  Show dependency treegraph
 
Reported: 2014-02-10 16:20 PST by Michael Saboff
Modified: 2014-02-10 16:42 PST (History)
0 users

See Also:


Attachments
Patch (6.24 KB, patch)
2014-02-10 16:24 PST, Michael Saboff
fpizlo: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Saboff 2014-02-10 16:20:17 PST
If the FTL compiles a function with a stack larger than a certain limit (128K has been suggest), fail the compile.

It probably makes sense to make the limit configurable.
Comment 1 Michael Saboff 2014-02-10 16:24:59 PST
Created attachment 223765 [details]
Patch
Comment 2 Geoffrey Garen 2014-02-10 16:31:28 PST
Comment on attachment 223765 [details]
Patch

r=me
Comment 3 Filip Pizlo 2014-02-10 16:31:50 PST
Comment on attachment 223765 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=223765&action=review

> Source/JavaScriptCore/ftl/FTLStackMaps.h:104
> +    unsigned getStackSize() const;

I would call this stackSize() and not getStackSize().  We don't usually prepend getters with "get".  The reason why "getRecordMap()" has a "get" in it is that it actually has to do significant work to return the record map.  Probably, that should be called "computeRecordMap()".  But your "getStackSize" is not computing anything, and it's a getter, so lets just call it "stackSize()".
Comment 4 Filip Pizlo 2014-02-10 16:32:10 PST
Comment on attachment 223765 [details]
Patch

r=me but change the name of getStackSize
Comment 5 Michael Saboff 2014-02-10 16:32:56 PST
(In reply to comment #3)
> (From update of attachment 223765 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=223765&action=review
> 
> > Source/JavaScriptCore/ftl/FTLStackMaps.h:104
> > +    unsigned getStackSize() const;
> 
> I would call this stackSize() and not getStackSize().  We don't usually prepend getters with "get".  The reason why "getRecordMap()" has a "get" in it is that it actually has to do significant work to return the record map.  Probably, that should be called "computeRecordMap()".  But your "getStackSize" is not computing anything, and it's a getter, so lets just call it "stackSize()".

Agreed.  I'll change it.
Comment 6 Michael Saboff 2014-02-10 16:42:38 PST
Committed r163838: <http://trac.webkit.org/changeset/163838>