Skip to content

Commit

Permalink
rename
Browse files Browse the repository at this point in the history
remove useless collect
  • Loading branch information
zi0Black committed Jan 16, 2025
1 parent e251e49 commit 4f6bcc2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion testsuite/fuzzer/fuzz.sh
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ function run() {
fi
fi
info "Running $fuzz_target"
cargo_fuzz run --sanitizer none -O $fuzz_target $testcase -- -fork=15 #-ignore_crashes=1
cargo_fuzz run --sanitizer address -O $fuzz_target $testcase -- -fork=15 #-ignore_crashes=1
}

function test() {
Expand Down
9 changes: 4 additions & 5 deletions third_party/move/move-binary-format/src/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,11 @@ pub type PartialVMResult<T> = ::std::result::Result<T, PartialVMError>;
/// e.g. DEBUG_VM_STATUS=ABORTED,UNKNOWN_INVARIANT_VIOLATION_ERROR ./fuzz.sh run move_aptosvm_publish_and_run <testcase>
/// third_party/move/move-core/types/src/vm_status.rs:506 for the list of status codes.
#[cfg(feature = "fuzzing")]
macro_rules! maybe_debug_panic {
macro_rules! fuzzing_maybe_panic {
($major_status:expr, $message:expr) => {{
if let Ok(debug_statuses) = std::env::var("DEBUG_VM_STATUS") {
let status_strings: Vec<&str> = debug_statuses.split(',').collect();
if status_strings
.iter()
if debug_statuses
.split(',')
.any(|s| s.trim() == format!("{:?}", $major_status))
{
panic!("PartialVMError: {:?} {:?}", $major_status, $message);
Expand Down Expand Up @@ -458,7 +457,7 @@ impl PartialVMError {
};

#[cfg(feature = "fuzzing")]
maybe_debug_panic!(major_status, message);
fuzzing_maybe_panic!(major_status, message);

Self(Box::new(PartialVMError_ {
major_status,
Expand Down

0 comments on commit 4f6bcc2

Please sign in to comment.