diff --git a/src/node_process_methods.cc b/src/node_process_methods.cc index 912ac9bec23..b34cbf89b6c 100644 --- a/src/node_process_methods.cc +++ b/src/node_process_methods.cc @@ -66,7 +66,8 @@ static void Abort(const FunctionCallbackInfo& args) { // For internal testing only, not exposed to userland. static void CauseSegfault(const FunctionCallbackInfo& args) { // This should crash hard all platforms. - *static_cast(nullptr) = nullptr; + volatile void** d = static_cast(nullptr); + *d = nullptr; } static void Chdir(const FunctionCallbackInfo& args) {