| Index: base/security_unittest.cc
|
| diff --git a/base/security_unittest.cc b/base/security_unittest.cc
|
| index f4c60a75db7291df8f4d51b8a495d48e6915a34d..50032694dad59dff16d9f3db9cbda999d6ef6d07 100644
|
| --- a/base/security_unittest.cc
|
| +++ b/base/security_unittest.cc
|
| @@ -290,11 +290,11 @@ TEST(SecurityTest, MAYBE_NewOverflow) {
|
| // Call calloc(), eventually free the memory and return whether or not
|
| // calloc() did succeed.
|
| bool CallocReturnsNull(size_t nmemb, size_t size) {
|
| + // We need the two calls to HideValueFromCompiler(): we have seen LLVM
|
| + // optimize away the call to calloc() entirely and assume the pointer to not
|
| + // be NULL.
|
| scoped_ptr<char, base::FreeDeleter> array_pointer(
|
| - static_cast<char*>(calloc(nmemb, size)));
|
| - // We need the call to HideValueFromCompiler(): we have seen LLVM
|
| - // optimize away the call to calloc() entirely and assume
|
| - // the pointer to not be NULL.
|
| + static_cast<char*>(HideValueFromCompiler(calloc(nmemb, size))));
|
| return HideValueFromCompiler(array_pointer.get()) == NULL;
|
| }
|
|
|
|
|