Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Firefox/third_party/rust/audio-mixer/   (Browser von der Mozilla Stiftung Version 136.0.1©)  Datei vom 10.2.2025 mit Größe 1 kB image not shown  

Quelle  run_sanitizers.sh   Sprache: Shell

 
# The option `Z` is only accepted on the nightly compiler
# so changing to nightly toolchain by `rustup default nightly` is required.

# See: https://github.com/rust-lang/rust/issues/39699 for more sanitizer support.

toolchain="$(rustup default)"
echo -e "\nUse Rust toolchain: $toolchain"

NIGHTLY_PREFIX="nightly"
if [ ! -z "${toolchain##$NIGHTLY_PREFIX*}" ]; then
  echo -e "The sanitizer is only available on Rust Nightly only. Skip."
  exit
fi

if [ -z "${toolchain##*windows*}" ]; then
  echo -e "The sanitizer doesn't work on Windows platform yet"
  exit
fi

# Display verbose backtrace for debugging if backtrace is unset
if [ -z "${RUST_BACKTRACE}" ]; then
  export RUST_BACKTRACE=1
fi
echo -e "RUST_BACKTRACE is set to ${RUST_BACKTRACE}\n"

# {Address, Thread}Sanitizer cannot build with `criterion` crate, so `criterion` will be removed
# from the `Cargo.toml` temporarily during the sanitizer tests.
ORIGINAL_MANIFEST="Cargo_ori.toml"
mv Cargo.toml $ORIGINAL_MANIFEST
# Delete lines that contain a `criterion` from Cargo.toml.
sed '/criterion/d' $ORIGINAL_MANIFEST > Cargo.toml

sanitizers=("address" "leak" "memory" "thread")
for san in "${sanitizers[@]}"
do
  San="$(tr '[:lower:]' '[:upper:]' <<< ${san:0:1})${san:1}"
  echo -e "\n\nRun ${San}Sanitizer\n------------------------------"
  if [ $san = "leak" ]; then
    echo -e "Skip the test that panics. Leaking memory when the program drops out abnormally is ok."
    options="-- --Z unstable-options --exclude-should-panic"
  fi
  if [ $san = "memory" ]; then
    if [ -z "${toolchain##*darwin*}" ]; then
      echo -e "Skip the MemorySanitizer on Mac OS since it doesn't works with $toolchain"
    else
      echo -e "Skip the MemorySanitizer since it fails to run custom build command for bitflags crate"
    fi
    continue
  fi
  RUSTFLAGS="-Z sanitizer=${san}" cargo test $options
done

mv $ORIGINAL_MANIFEST Cargo.toml

Messung V0.5
C=94 H=93 G=93

¤ Dauer der Verarbeitung: 0.3 Sekunden  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.