Skip to content

Commit

Permalink
test: fix volatile for CauseSegfault with clang
Browse files Browse the repository at this point in the history
PR-URL: #54325
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
tie authored and targos committed Sep 22, 2024
1 parent 29eafdb commit ad458a1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/node_process_methods.cc
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ 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.
volatile void** d = static_cast<volatile void**>(nullptr);
void* volatile* d = static_cast<void* volatile*>(nullptr);
*d = nullptr;
}

Expand Down

0 comments on commit ad458a1

Please sign in to comment.