summaryrefslogtreecommitdiffstats
path: root/base
diff options
context:
space:
mode:
authorhans@chromium.org <hans@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-09 13:38:24 +0000
committerhans@chromium.org <hans@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-09 13:38:24 +0000
commit70e8887dabc73a6893fccca426878b475f404166 (patch)
tree1e54462d9209af2eed501afe067bcefdc0b42497 /base
parent2b14319b73e07cb1f39aab2b768e7072048327b0 (diff)
downloadchromium_src-70e8887dabc73a6893fccca426878b475f404166.zip
chromium_src-70e8887dabc73a6893fccca426878b475f404166.tar.gz
chromium_src-70e8887dabc73a6893fccca426878b475f404166.tar.bz2
Make a null pointer dereference volatile
Otherwise the compiler could optimize it away. BUG=none R=jar@chromium.org Review URL: https://codereview.chromium.org/14862007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@199210 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base')
-rw-r--r--base/win/dllmain.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/base/win/dllmain.cc b/base/win/dllmain.cc
index 15437e0..9d2a6dc 100644
--- a/base/win/dllmain.cc
+++ b/base/win/dllmain.cc
@@ -84,8 +84,9 @@ PIMAGE_TLS_CALLBACK p_thread_callback_dllmain_typical_entry = on_callback;
#endif // _WIN64
} // extern "C"
+// Custom crash code to get a unique entry in crash reports.
NOINLINE static void CrashOnProcessDetach() {
- *((int*)0) = 0x356;
+ *static_cast<volatile int*>(0) = 0x356;
}
// Make DllMain call the listed callbacks. This way any third parties that are