From cad404e1a1989372e94db1ad9fe70f9cd60b9046 Mon Sep 17 00:00:00 2001 From: Ivan Trubach Date: Sun, 8 Sep 2024 01:29:24 +0300 Subject: [PATCH] test: fix volatile for CauseSegfault with clang PR-URL: https://github.com/nodejs/node/pull/54325 Reviewed-By: Anna Henningsen Reviewed-By: James M Snell --- src/node_process_methods.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/node_process_methods.cc b/src/node_process_methods.cc index d39e49e355ef2e..127ef63210b962 100644 --- a/src/node_process_methods.cc +++ b/src/node_process_methods.cc @@ -73,7 +73,7 @@ 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. - volatile void** d = static_cast(nullptr); + void* volatile* d = static_cast(nullptr); *d = nullptr; }