mirror of
https://github.com/nodejs/node.git
synced 2025-12-28 07:50:41 +00:00
test: fix volatile for CauseSegfault with clang
PR-URL: https://github.com/nodejs/node/pull/54325 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
parent
4a840cecfa
commit
f7af8ca021
@ -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;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user