You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some packages (eg. rten-tensor) can be run under Miri to check for bugs. There are tests in the main rten crate which run much too slowly under Miri however. Instead these tests can be run under ASAN or other sanitizers. Aside from ASAN, the other sanitizers that would be most useful are MemorySanitizer and ThreadSanitizer to check for uninitialized reads and data races respectively.
Locally I was able to run the library tests under ASAN with:
RUSTFLAGS=-Zsanitizer=address cargo +nightly test -Zbuild-std --target x86_64-apple-darwin --lib
--target needs to be adjusted as appropriate.
Some notes:
In my testing, using -Zbuild-std was necessary to catch a dummy bug that I inserted (an out-of-bounds read)
The --lib flag is needed to skip doctests, as these failed to compile under ASAN
The text was updated successfully, but these errors were encountered:
Some packages (eg. rten-tensor) can be run under Miri to check for bugs. There are tests in the main
rten
crate which run much too slowly under Miri however. Instead these tests can be run under ASAN or other sanitizers. Aside from ASAN, the other sanitizers that would be most useful are MemorySanitizer and ThreadSanitizer to check for uninitialized reads and data races respectively.Locally I was able to run the library tests under ASAN with:
--target
needs to be adjusted as appropriate.Some notes:
-Zbuild-std
was necessary to catch a dummy bug that I inserted (an out-of-bounds read)--lib
flag is needed to skip doctests, as these failed to compile under ASANThe text was updated successfully, but these errors were encountered: