<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>109388</bug_id>
          
          <creation_ts>2013-02-10 14:06:20 -0800</creation_ts>
          <short_desc>Implicit type check on local variables hoisting is unsound with respect to CFG simplification</short_desc>
          <delta_ts>2013-02-28 12:43:51 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>JavaScriptCore</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>109389</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>109371</dependson>
    
    <dependson>110433</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Filip Pizlo">fpizlo</reporter>
          <assigned_to name="Filip Pizlo">fpizlo</assigned_to>
          <cc>barraclough</cc>
    
    <cc>ggaren</cc>
    
    <cc>mark.lam</cc>
    
    <cc>mhahnenberg</cc>
    
    <cc>msaboff</cc>
    
    <cc>oliver</cc>
    
    <cc>sam</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>829355</commentid>
    <comment_count>0</comment_count>
    <who name="Filip Pizlo">fpizlo</who>
    <bug_when>2013-02-10 14:06:20 -0800</bug_when>
    <thetext>We may hoist int, number, cell, or boolean checks into SetLocals.  But we do so implicitly - the SetLocal doesn&apos;t &quot;know&quot; that it has this check; the CFA and the backend end up just deciding to put checks there without telling anyone else.  So, if you CFG simplify and get rid of a SetLocal that had a type check that you had used to construct some proof, then you&apos;re going to have a really bad time.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>829361</commentid>
    <comment_count>1</comment_count>
    <who name="Filip Pizlo">fpizlo</who>
    <bug_when>2013-02-10 14:55:40 -0800</bug_when>
    <thetext>The best way to solve this is to explicitly have the Fixup phase shove type checks into Phantom nodes with appropriate Edges that are just above the SetLocal.  Then CFG simplification will be able to &quot;just work&quot; and not worry about this.  This of course relies on https://bugs.webkit.org/show_bug.cgi?id=109371.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>844375</commentid>
    <comment_count>2</comment_count>
    <who name="Filip Pizlo">fpizlo</who>
    <bug_when>2013-02-28 12:43:51 -0800</bug_when>
    <thetext>My current approach to fixing this is to handle it as part of DCE hardening.

*** This bug has been marked as a duplicate of bug 109389 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>