Commit 7a48b848 authored by titzer@chromium.org's avatar titzer@chromium.org

Fix more stack smashing bugs in test.

R=mstarzinger@chromium.org
BUG=

Review URL: https://codereview.chromium.org/415403008

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22821 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 0898e9ec
......@@ -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};
......@@ -420,6 +420,8 @@ TEST(RunStoreElementFromUntaggedBase) {
CHECK_EQ(expected, t.Call(expected));
CHECK_EQ(expected, smis[i + j]);
}
// TODO(titzer): assert the contents of the array.
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment