summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/node_process_methods.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/node_process_methods.cc b/src/node_process_methods.cc
index 912ac9bec2..b34cbf89b6 100644
--- a/src/node_process_methods.cc
+++ b/src/node_process_methods.cc
@@ -66,7 +66,8 @@ static void Abort(const FunctionCallbackInfo<Value>& args) {
// For internal testing only, not exposed to userland.
static void CauseSegfault(const FunctionCallbackInfo<Value>& args) {
// This should crash hard all platforms.
- *static_cast<void**>(nullptr) = nullptr;
+ volatile void** d = static_cast<volatile void**>(nullptr);
+ *d = nullptr;
}
static void Chdir(const FunctionCallbackInfo<Value>& args) {