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: nodejs#54325
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: James M Snell <[email protected]>
  • Loading branch information
tie authored and louwers committed Nov 2, 2024
1 parent dfc6e19 commit 7514e57
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 @@ -73,7 +73,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 7514e57

Please sign in to comment.