Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(340)

Unified Diff: test/mjsunit/regress/regress-crbug-319835.js

Issue 74113002: Limit size of dehoistable array indices (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/lithium.cc ('k') | test/mjsunit/regress/regress-crbug-319860.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
+}
« no previous file with comments | « src/lithium.cc ('k') | test/mjsunit/regress/regress-crbug-319860.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698