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

Unified Diff: src/ia32/macro-assembler-ia32.cc

Issue 11931037: Out of bounds memory access in TestJSArrayForAllocationSiteInfo. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Updated other platform conditional test to match change in ia32 Created 7 years, 11 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
Index: src/ia32/macro-assembler-ia32.cc
diff --git a/src/ia32/macro-assembler-ia32.cc b/src/ia32/macro-assembler-ia32.cc
index cebfb13727d54033e58f8c927aeea3c5f895c2f6..cc548c88e14d4b7f345a5713a39764c3df0532de 100644
--- a/src/ia32/macro-assembler-ia32.cc
+++ b/src/ia32/macro-assembler-ia32.cc
@@ -3061,12 +3061,12 @@ void MacroAssembler::TestJSArrayForAllocationSiteInfo(
ExternalReference::new_space_allocation_top_address(isolate());
lea(scratch_reg, Operand(receiver_reg,
- JSArray::kSize + AllocationSiteInfo::kSize));
+ JSArray::kSize + AllocationSiteInfo::kSize - kHeapObjectTag));
cmp(scratch_reg, Immediate(new_space_start));
j(less, &no_info_available);
cmp(scratch_reg, Operand::StaticVariable(new_space_allocation_top));
- j(greater_equal, &no_info_available);
- cmp(MemOperand(scratch_reg, 0),
+ j(greater, &no_info_available);
+ cmp(MemOperand(scratch_reg, -AllocationSiteInfo::kSize),
Immediate(Handle<Map>(isolate()->heap()->allocation_site_info_map())));
j(equal, allocation_info_present);
bind(&no_info_available);

Powered by Google App Engine
This is Rietveld 408576698