ARM: Fix valgrind reported error on O3 that was causing minor stats changes.

This commit is contained in:
Ali Saidi
2012-03-09 09:59:26 -05:00
parent eaa994e7f6
commit ec1ef24895

View File

@@ -156,7 +156,10 @@ class AtagCmdline : public AtagHeader
delete[] storage;
storage = new uint32_t[size()];
// Initialize the last byte of memory here beacuse it might be slightly
// longer than needed and mis-speculation of the NULL in the O3 CPU can
// change stats ever so slightly when that happens.
storage[size() - 1] = 0;
strcpy((char*)&storage[2] , s.c_str());
}
AtagCmdline()