Index: test/cctest/test-conversions.cc |
diff --git a/test/cctest/test-conversions.cc b/test/cctest/test-conversions.cc |
index 2fee58a46d11a96f7370c5522fb541c3bce766f0..d13badd20273ad31a236f4673b8758b190e4da9f 100644 |
--- a/test/cctest/test-conversions.cc |
+++ b/test/cctest/test-conversions.cc |
@@ -444,3 +444,15 @@ TEST(NoHandlesForTryNumberToSize) { |
} |
} |
} |
+ |
+TEST(TryNumberToSizeWithMaxSizePlusOne) { |
+ i::Isolate* isolate = CcTest::i_isolate(); |
+ { |
+ HandleScope scope(isolate); |
+ // 1 << 64, larger than the limit of size_t. |
+ double value = 18446744073709551616.0; |
+ size_t result = 0; |
+ Handle<HeapNumber> heap_number = isolate->factory()->NewHeapNumber(value); |
+ CHECK(!TryNumberToSize(*heap_number, &result)); |
+ } |
+} |