From a105499197743b6751ecf4f915b20072fd4e2cfb 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 21d289dc77fb6b..8faf5ded811437 100644 --- a/src/node_process_methods.cc +++ b/src/node_process_methods.cc @@ -72,7 +72,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; }