AddressSanitizer
Hacker ApprovedRanked 3 of 6 sanitizers by recommenders
People recommend it for catching memory bugs during testing, such as leaks and out-of-bounds access. Critics say its runtime cost makes it too slow for production use.
People recommend it for catching memory bugs during testing, such as leaks and out-of-bounds access. Critics say its runtime cost makes it too slow for production use.
25 people gave an opinion
- recommend it
- 21
- criticize it
- 4
- approval share
- 84%
Recommended in 7 of 13 months
- November 2025: recommended
- December 2025: recommended
- January 2026: recommended
- February 2026: recommended
- March 2026: recommended
- April 2026: not recommended
- May 2026: recommended
- June 2026: not recommended
- July 2026: not recommended
- August 2026: not recommended
- September 2026: not recommended
- October 2026: recommended
- November 2026: not recommended (month in progress)
Why it carries the badge
- 21 people recommend itNeeds 10 or more, met.
- 5.3 recommenders for every criticNeeds 2 to 1 or better, met.
- Recommended in 7 of 13 monthsNeeds 4 or more, met.
The same three rules apply to every product, and the badge can’t be bought. How the badge works
What people say about it
The reasons people give, with the number of comments that give each one. Open a reason to read what they said.
Why people recommend it
Each mark is one comment
Runs in CI and test suites
“build and test with sanitizers (ASAN, UBSAN, TSAN) when not measuring performance”
Comment from 10 Oct 2026 in “C for Rust programmers” “a mandatory test pass running with UBSan/ASan/Valgrind”
Comment from 22 Oct 2026 in “Rust Style Guide” “you should be running your rust tests under asan”
Comment from 13 Oct 2026 in “11 year old unsoundness bugs found in Rust borrow checker” - Comment from 8 Feb 2026 in “I Write Games in C (yes, C)”
- Comment from 10 Mar 2026 in “Ask HN: Is anyone vibe-coding in C?”
- Comment from 14 Oct 2026 in “Arena Allocators in C”
Catches memory errors and leaks in tests
“I'd be surprised if some combination of ASAN and UBSAN wouldn't catch this and similar dangling references”
Comment from 30 Nov 2025 in “Hardening the C++ Standard Library at scale” “If you just want memory safety checking during QA, I suspect you are better off sticking with ASan.”
Comment from 3 Nov 2025 in “Notes by djb on using Fil-C” “catch pretty much all of the 'trivial' memory corruption issues”
Comment from 20 May 2026 in “Everything in C is undefined behavior” - Comment from 7 Jan 2026 in “C Is Best”
- Comment from 20 May 2026 in “Everything in C is undefined behavior”
Widely praised as amazing
“ASAN/LSAN is amazing. It absolutely monkey-hammers performance though.”
Comment from 19 Feb 2026 in “-fbounds-safety: Enforcing bounds safety for C” “clang-tidy, ASAN, UBSAN, LSAN, MSAN, and TSAN are AMAZING”
Comment from 13 Jan 2026 in “LLVM: The Bad Parts” “ASAN, UBSAN, LSAN, MSAN, and TSAN are AMAZING.”
Comment from 12 Jan 2026 in “LLVM: The Bad Parts” Faster than Valgrind, low overhead
“enabling this and all the other sanitize options will have a negligible effect on the useful performance”
Comment from 16 Jan 2026 in “A 0-click exploit chain for the Pixel 9 Part 1: Decoding Dolby” “The sanitisers are about 10x to 50x faster than valgrind.”
Comment from 19 Feb 2026 in “-fbounds-safety: Enforcing bounds safety for C”
What people warn about
Each mark is one comment
Too slow for production use
“Carrying around stuff like ASan / TSan and a ton of other checks is just pretty expensive”
Comment from 9 Oct 2026 in “Reducing undefined behavior in the C language” “ASAN/LSAN is amazing. It absolutely monkey-hammers performance though.”
Comment from 19 Feb 2026 in “-fbounds-safety: Enforcing bounds safety for C” “its performance cost makes it unsuitable for production use”
Comment from 19 Feb 2026 in “-fbounds-safety: Enforcing bounds safety for C” - Comment from 16 Jan 2026 in “A 0-click exploit chain for the Pixel 9 Part 1: Decoding Dolby”
Other sanitizers people recommend
The four most recommended other sanitizers, with the same counts for each, so you can compare like for like. The tick on each bar marks the 2 to 1 line the badge needs.
| Product | Recommend | Criticize | Approval | Months | Owned | Badge |
|---|---|---|---|---|---|---|
| Valgrind | 29 | 8 | 78% | 13 | — | Approved |
| Miri | 26 | 3 | 90% | 12 | — | Approved |
| AddressSanitizerThis page | 21 | 4 | 84% | 7 | — | Approved |
| UndefinedBehaviorSanitizer | 12 | 0 | 100% | 5 | — | Approved |
| Go race detector | 5 | 1 | 83% | 4 | — | — |
What people said
26 of the 28 comments that mention it, newest first. Each links to the original comment.
“a mandatory test pass running with UBSan/ASan/Valgrind”
“test with ASAN, UBSAN and TSAN”
“you should be running your rust tests under asan”
“build and test with sanitizers (ASAN, UBSAN, TSAN) when not measuring performance”
“Carrying around stuff like ASan / TSan and a ton of other checks is just pretty expensive”
“Valgrind and asan will allow a buggy access (like an OOB) to succeed if the resulting address is valid at all”
“it will catch many or most of issues as they happen.”
“catch pretty much all of the 'trivial' memory corruption issues”
“developing a unit test framework based on Catch2 and ASAN that tracks new/delete invocations is rather powerful”
“running with sanitizers (ASAN, UBSan)”
“ASan helps here, but it's not trivial to run in all embedded contexts”
“The sanitisers are about 10x to 50x faster than valgrind.”
“ASAN/LSAN is amazing. It absolutely monkey-hammers performance though.”
“its performance cost makes it unsuitable for production use”
“already have several years of production experience, in a mature ecosystem”
“We run valgrind and asan as part of the CI”
“plus sanitizers like ASan, is basically the valgrind equivalent on macOS”
“enabling this and all the other sanitize options will have a negligible effect on the useful performance”
“It's too slow to be used in production”
“clang-tidy, ASAN, UBSAN, LSAN, MSAN, and TSAN are AMAZING”
“ASAN, UBSAN, LSAN, MSAN, and TSAN are AMAZING.”
“use ASAN or Valgrind then leak detection is not difficult”
“Asan is not memory safe. It's just a bug finding tool.”
“I'd be surprised if some combination of ASAN and UBSAN wouldn't catch this and similar dangling references”
“This plays hell on things like Valgrind or ASAN.”
“If you just want memory safety checking during QA, I suspect you are better off sticking with ASan.”
Counts come from 1,795,640 Hacker News comments, November 2025 to November 2026. How we count. Report a mistake.