Commit 59ba0417 authored by kaiwang@chromium.org's avatar kaiwang@chromium.org

Write to NULL will trigger a Clang compile warning and the compiler may

optimize and turn it into a non-op.
int* -> volatile int* to fix this.

BUG=127724

Review URL: https://chromiumcodereview.appspot.com/10392109

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@137251 0039d316-1c4b-4281-b951-d872f2087c98
parent f702471e
...@@ -25,7 +25,7 @@ inline void Abort() { ...@@ -25,7 +25,7 @@ inline void Abort() {
namespace tcmalloc { namespace tcmalloc {
inline void Abort() { inline void Abort() {
// Make a segmentation fault to force abort. // Make a segmentation fault to force abort.
*reinterpret_cast<int*>(NULL) = 0x2001; *reinterpret_cast<volatile int*>(NULL) = 0x2001;
} }
} // namespace tcmalloc } // namespace tcmalloc
......
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