<?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>106978</bug_id>
          
          <creation_ts>2013-01-15 20:59:53 -0800</creation_ts>
          <short_desc>DFG X86: division in the used-as-int case doesn&apos;t correctly check for -2^31/-1</short_desc>
          <delta_ts>2013-01-16 02:26:18 -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>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Michael Saboff">msaboff</reporter>
          <assigned_to name="Michael Saboff">msaboff</assigned_to>
          <cc>d-r</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>808021</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Saboff">msaboff</who>
    <bug_when>2013-01-15 20:59:53 -0800</bug_when>
    <thetext>From &lt;rdar://problem/13021805&gt;

Try this program:

function foo(a, b) {
    return (a / b) | 0;
}

for (var i = 0; i &lt; 200; ++i)
    print(foo(-2147483647-1, -1));

Expected result: prints -2147483648 200 times.

Actual result: crash.

The reason is that the !nodeUsedAsNumber(node.arithNodeFlags()) case of ArithDiv doesn&apos;t correctly handle -2^31/-1.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>808041</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Saboff">msaboff</who>
    <bug_when>2013-01-15 21:48:28 -0800</bug_when>
    <thetext>Committed r139835: &lt;http://trac.webkit.org/changeset/139835&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>808202</commentid>
    <comment_count>2</comment_count>
    <who name="Dominik Röttsches (drott)">d-r</who>
    <bug_when>2013-01-16 02:26:18 -0800</bug_when>
    <thetext>Expected test results fixed, see bug 106991.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>