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

Unified Diff: test/cctest/test-assembler-arm.cc

Issue 17116006: Fix a crash when generating forward jumps to labels at very high assembly offsets (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 7 years, 5 months 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/arm/assembler-arm.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-assembler-arm.cc
===================================================================
--- test/cctest/test-assembler-arm.cc (revision 15993)
+++ test/cctest/test-assembler-arm.cc (working copy)
@@ -1418,4 +1418,25 @@
CHECK_EQ(0x11121313, t.dst4);
}
+
+TEST(17) {
+ // Test generating labels at high addresses.
+ // Should not assert.
+ CcTest::InitializeVM();
+ Isolate* isolate = Isolate::Current();
+ HandleScope scope(isolate);
+
+ // Generate a code segment that will be longer than 2^24 bytes.
+ Assembler assm(isolate, NULL, 0);
+ for (size_t i = 0; i < 1 << 23 ; ++i) { // 2^23
+ __ nop();
+ }
+
+ Label target;
+ __ b(eq, &target);
+ __ bind(&target);
+ __ nop();
+}
+
+
#undef __
« no previous file with comments | « src/arm/assembler-arm.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698