Repository navigation
Commit c2ec608
committed
cpu_guard test: probe a libc symbol no sanitizer interposes
cargo-careful has been red on every master merge since #355. Under
-Zcareful-sanitizer (ASan) `malloc` is ASan's interceptor, linked into the
executable, so the can-stay-silent test's premise (`malloc` lives in libc)
is false there. The guard code is unchanged; the test now probes glibc's
`gnu_get_libc_version`, which no sanitizer replaces.
Verified: plain build 14/14 cpu_guard tests; `cargo +nightly careful test
-Zcareful-sanitizer` passes; reverting to `malloc` fails there exactly as
CI does (cpu_guard.rs:712). Scratch reproduction with -Zsanitizer=address:
malloc in main image true, gnu_get_libc_version false.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011BMJnDBAfzcuQh5HeT39Rh1 parent c79ee31 commit c2ec608
2 files changed
Lines changed: 19 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
1 | 7 | | |
2 | 8 | | |
3 | 9 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
692 | 692 | | |
693 | 693 | | |
694 | 694 | | |
695 | | - | |
696 | | - | |
697 | | - | |
698 | | - | |
699 | | - | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
700 | 705 | | |
701 | 706 | | |
702 | 707 | | |
| |||
707 | 712 | | |
708 | 713 | | |
709 | 714 | | |
710 | | - | |
| 715 | + | |
711 | 716 | | |
712 | | - | |
| 717 | + | |
| 718 | + | |
713 | 719 | | |
714 | 720 | | |
715 | 721 | | |
| |||
0 commit comments