# AddressSanitizer

21 Hacker News commenters recommended AddressSanitizer and 4 criticized it, November 2025 to November 2026. It was recommended in 7 of 13 months. It meets the Hacker Approved badge rule.

**Verdict:** 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.

## Why people recommend it

- Runs in CI and test suites (6 comments): "build and test with sanitizers (ASAN, UBSAN, TSAN) when not measuring performance" ([source](https://news.ycombinator.com/item?id=50032787)) "a mandatory test pass running with UBSan/ASan/Valgrind" ([source](https://news.ycombinator.com/item?id=50201093)) "you should be running your rust tests under asan" ([source](https://news.ycombinator.com/item?id=50071227))
- Catches memory errors and leaks in tests (5 comments): "I'd be surprised if some combination of ASAN and UBSAN wouldn't catch this and similar dangling references" ([source](https://news.ycombinator.com/item?id=46098735)) "If you just want memory safety checking during QA, I suspect you are better off sticking with ASan." ([source](https://news.ycombinator.com/item?id=45794724)) "catch pretty much all of the 'trivial' memory corruption issues" ([source](https://news.ycombinator.com/item?id=48204254))
- Widely praised as amazing (3 comments): "ASAN/LSAN is amazing. It absolutely monkey-hammers performance though." ([source](https://news.ycombinator.com/item?id=47076334)) "clang-tidy, ASAN, UBSAN, LSAN, MSAN, and TSAN are AMAZING" ([source](https://news.ycombinator.com/item?id=46601166)) "ASAN, UBSAN, LSAN, MSAN, and TSAN are AMAZING." ([source](https://news.ycombinator.com/item?id=46594180))
- Faster than Valgrind, low overhead (2 comments): "enabling this and all the other sanitize options will have a negligible effect on the useful performance" ([source](https://news.ycombinator.com/item?id=46645054)) "The sanitisers are about 10x to 50x faster than valgrind." ([source](https://news.ycombinator.com/item?id=47077911))

## What people warn about

- Too slow for production use (4 comments): "Carrying around stuff like ASan / TSan and a ton of other checks is just pretty expensive" ([source](https://news.ycombinator.com/item?id=50016941)) "ASAN/LSAN is amazing. It absolutely monkey-hammers performance though." ([source](https://news.ycombinator.com/item?id=47076334)) "its performance cost makes it unsuitable for production use" ([source](https://news.ycombinator.com/item?id=47075445))

## Alternatives hackers recommend

- [Valgrind](https://hackerapproved.com/p/valgrind.md): 29 recommend
- [Miri](https://hackerapproved.com/p/miri.md): 26 recommend
- [UndefinedBehaviorSanitizer](https://hackerapproved.com/p/undefinedbehaviorsanitizer.md): 12 recommend
- [Go race detector](https://hackerapproved.com/p/go-race-detector.md): 5 recommend
- [ThreadSanitizer](https://hackerapproved.com/p/threadsanitizer.md): 5 recommend

## Cite as

Hacker Approved, "AddressSanitizer", https://hackerapproved.com/p/addresssanitizer/ (counts from 1,795,640 Hacker News comments, November 2025 to November 2026).
