https://codereview.chromium.org/553623004/diff/60001/test/mjsunit/array-length.js
File test/mjsunit/array-length.js (right):
https://codereview.chromium.org/553623004/diff/60001/test/mjsunit/array-length.js#newcode161
test/mjsunit/array-length.js:161:
Array.prototype.toLocaleString.apply(o);
On 2014/10/07 11:24:08, wingo wrote:
On 2014/09/24 11:25:08, Diego Pino wrote:
> On 2014/09/23 18:28:53, wingo wrote:
> > What does this evaluate to? Please tell me it's not a [ followed
by 2^53
> commas
> > :)
>
> LOL, got to test all cases.
It's a serious question! We can't generate such a value during the
tests. What
does it evaluate to?
Sorry about that. I didn't mean to make fun of it.
When that expression is evaluated I got an exception. The same happens
for Integer.MAX_SAFE_INTEGER. However, if I try 0xffffffff there's a
crash and I got a core dump:
d8> var o = { length: 0xffffffff };
undefined
d8> Array.prototype.toLocaleString.apply(o)
#
# Fatal error in invalid table size
# Allocation failed - process out of memory
#
Illegal instruction (core dumped)
I'm not sure about what to do. Should I avoid testing any big positive
number to avoid the possibility that the tests may crash?
https://codereview.chromium.org/553623004/diff/60001/test/mjsunit/array-length.js#newcode165
test/mjsunit/array-length.js:165: assertTrue(threw);
On 2014/10/07 11:24:08, wingo wrote:
On 2014/09/24 11:25:08, Diego Pino wrote:
> On 2014/09/23 18:28:53, wingo wrote:
> > use assertThrows
>
> I tried that, but it didn't work. This is what I get when trying to
use
> assertThrows:
What code did you try? In this case it can look like:
assertThrows(function() { Array.prototype.toLocaleString.apply(o) },
RangeError)
OK, this works. Before I tried
assertThrows(Array.prototype.toLocaleString.apply(o), RangeError)
https://codereview.chromium.org/553623004/diff/100001/test/mjsunit/array-length.js
File test/mjsunit/array-length.js (right):
https://codereview.chromium.org/553623004/diff/100001/test/mjsunit/array-length.js#newcode127
test/mjsunit/array-length.js:127: assertEquals(o.length,
Number.MIN_VALUE);
On 2014/10/07 11:24:08, wingo wrote:
the order is assertEquals(expected, found); so we need to reverse this
one and
others
Acknowledged.
https://codereview.chromium.org/553623004/
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.