1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
|
Description: avoid not-in-Debian crate crabgrind
Author: Jonas Smedegaard <dr@jones.dk>
Forwarded: not-needed
Last-Update: 2024-09-30
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -16,9 +16,6 @@
std = ["alloc"]
web = ["web-time"]
-[target.'cfg(all(target_os = "linux", target_arch = "x86_64"))'.dev-dependencies]
-crabgrind = "=0.1.9" # compatible with valgrind package on GHA ubuntu-latest
-
[target.'cfg(all(target_family = "wasm", target_os = "unknown"))'.dependencies]
web-time = { version = "1", optional = true }
--- a/src/base64.rs
+++ b/src/base64.rs
@@ -702,28 +702,6 @@
}
}
- #[cfg(all(feature = "std", target_os = "linux", target_arch = "x86_64"))]
- #[test]
- fn codepoint_decode_secret_does_not_branch_or_index_on_secret_input() {
- // this is using the same theory as <https://github.com/agl/ctgrind>
- use crabgrind as cg;
-
- if matches!(cg::run_mode(), cg::RunMode::Native) {
- std::println!("SKIPPED: must be run under valgrind");
- return;
- }
-
- let input = [b'a'];
- cg::monitor_command(format!(
- "make_memory undefined {:p} {}",
- input.as_ptr(),
- input.len()
- ))
- .unwrap();
-
- core::hint::black_box(CodePoint::decode_secret(input[0]));
- }
-
#[track_caller]
fn decode(input: &[u8]) -> alloc::vec::Vec<u8> {
let length = decoded_length(input.len());
|