Reviewers: Michael Starzinger,
Description:
Fix more stack smashing bugs in test.
[email protected]
BUG=
Please review this at https://codereview.chromium.org/415403008/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files (+3, -2 lines):
M test/cctest/compiler/test-simplified-lowering.cc
Index: test/cctest/compiler/test-simplified-lowering.cc
diff --git a/test/cctest/compiler/test-simplified-lowering.cc
b/test/cctest/compiler/test-simplified-lowering.cc
index
19826a0062c69d3d2aaca14394d3d6c55e1a39ec..972c2d44924105b30fd996d1fc535443c27226e9
100644
--- a/test/cctest/compiler/test-simplified-lowering.cc
+++ b/test/cctest/compiler/test-simplified-lowering.cc
@@ -372,7 +372,7 @@ TEST(RunLoadElementFromUntaggedBase) {
Smi::FromInt(4), Smi::FromInt(5)};
for (size_t i = 0; i < ARRAY_SIZE(smis); i++) { // for header sizes
- for (size_t j = i; j < ARRAY_SIZE(smis); j++) { // for element index
+ for (size_t j = 0; (i + j) < ARRAY_SIZE(smis); j++) { // for element
index
int offset = static_cast<int>(i * sizeof(Smi*));
ElementAccess access = {kUntaggedBase, offset, Type::Integral32(),
kMachineTagged};
@@ -400,7 +400,7 @@ TEST(RunStoreElementFromUntaggedBase) {
Smi::FromInt(4), Smi::FromInt(5)};
for (size_t i = 0; i < ARRAY_SIZE(smis); i++) { // for header sizes
- for (size_t j = i; j < ARRAY_SIZE(smis); j++) { // for element index
+ for (size_t j = 0; (i + j) < ARRAY_SIZE(smis); j++) { // for element
index
int offset = static_cast<int>(i * sizeof(Smi*));
ElementAccess access = {kUntaggedBase, offset, Type::Integral32(),
kMachineTagged};
@@ -414,6 +414,7 @@ TEST(RunStoreElementFromUntaggedBase) {
if (!Pipeline::SupportedTarget()) continue;
+ printf("i = %ld, j = %ld\n", i, j);
for (int k = -5; k <= 5; k++) {
Smi* expected = Smi::FromInt(k);
smis[i + j] = Smi::FromInt(-100);
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.