Fix unsafe bracket (#594)

This commit is contained in:
Dongjia Zhang 2022-04-05 21:24:58 +09:00 committed by GitHub
parent eaa46075cc
commit e7a06fb30c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -83,9 +83,9 @@ where
self.stalker.deactivate(); self.stalker.deactivate();
} }
#[cfg(unix)] #[cfg(unix)]
if unsafe { ASAN_ERRORS.is_some() && !ASAN_ERRORS.as_ref().unwrap().is_empty() } {
println!("Crashing target as it had ASAN errors");
unsafe { unsafe {
if ASAN_ERRORS.is_some() && !ASAN_ERRORS.as_ref().unwrap().is_empty() {
println!("Crashing target as it had ASAN errors");
libc::raise(libc::SIGABRT); libc::raise(libc::SIGABRT);
} }
} }