Index: test/mjsunit/regress/regress-crbug-319835.js |
diff --git a/test/mjsunit/regress/regress-polymorphic-store.js b/test/mjsunit/regress/regress-crbug-319835.js |
similarity index 77% |
copy from test/mjsunit/regress/regress-polymorphic-store.js |
copy to test/mjsunit/regress/regress-crbug-319835.js |
index 4723a7f4343bb79daf5283325ee5c1082abefa79..48f871f0a0d73e3fcec5e268bf674151cc802e45 100644 |
--- a/test/mjsunit/regress/regress-polymorphic-store.js |
+++ b/test/mjsunit/regress/regress-crbug-319835.js |
@@ -27,22 +27,25 @@ |
// Flags: --allow-natives-syntax |
-var o1 = {}; |
-o1.f1 = function() { return 10; }; |
-o1.x = 5; |
-o1.y = 2; |
-var o2 = {}; |
-o2.x = 5; |
-o2.y = 5; |
+try {} catch(e) {} // No need to optimize the top level. |
-function store(o, v) { |
- o.y = v; |
+var size = 0x20000; |
+var a = new Float64Array(size); |
+var training = new Float64Array(10); |
+function store(a, index) { |
+ var offset = 0x20000000; |
+ for (var i = 0; i < 1; i++) { |
+ a[index + offset] = 0xcc; |
+ } |
} |
-store(o2, 0); |
-store(o1, 0); |
-store(o2, 0); |
+store(training, -0x20000000); |
+store(training, -0x20000000 + 1); |
+store(training, -0x20000000); |
+store(training, -0x20000000 + 1); |
%OptimizeFunctionOnNextCall(store); |
-store(o1, 10); |
-assertEquals(5, o1.x); |
-assertEquals(10, o1.y); |
+ |
+// Segfault maybe? |
+for (var i = -0x20000000; i < -0x20000000 + size; i++) { |
+ store(a, i); |
+} |