mirror of
https://github.com/nodejs/node.git
synced 2026-11-27 17:52:27 -05: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:
1 parent
4a840cecfa
commit
f7af8ca021
1 file changed
+1
-1
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user