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 aduh95 committed Sep 12, 2024
1 parent c1b92e0 commit cad404e
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 cad404e

Please sign in to comment.