<?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>185495</bug_id>
          
          <creation_ts>2018-05-09 16:11:19 -0700</creation_ts>
          <short_desc>ArraySpeciesCreate not checking for max length on array like objects</short_desc>
          <delta_ts>2018-05-09 16:11:19 -0700</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>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=185476</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Leo Balter">leo</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ysuzuki</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1422548</commentid>
    <comment_count>0</comment_count>
    <who name="Leo Balter">leo</who>
    <bug_when>2018-05-09 16:11:19 -0700</bug_when>
    <thetext>I got a false positive from the test runner while working on Bug 185476. While the fix there is still fine, it doesn&apos;t solve the whole problem where a RangeError is not observed for non-array objects with the length property set to values &gt; 2**32-1. 

`constructArrayWithSizeQuirk` in the Source/JavaScriptCore/runtime/ArrayConstructor.cpp file has a check for the length - code below - but I was unable to reach it. My first patch was calling it but it&apos;s still not successful.

```
    uint32_t n = length.toUInt32(exec);
    if (n != length.toNumber(exec))
        return throwException(exec, scope, createRangeError(exec, ASCIILiteral(&quot;Array size is not a small enough positive integer.&quot;)));
```

Yusuke, would you help me here, please?</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>