Hacker GitHub

← All repos

google/sanitizers

View on GitHub ↗ ★ 12,516 C

AddressSanitizer, ThreadSanitizer, MemorySanitizer

55 mentions on Hacker News by 47 people: 6 stories, 49 comments · first 2016-01-15 · latest 2025-11-23

Mentions per year 55 mentions · busiest year 2016 (7)
20082026
  1. …MemSan: MemorySanitizer Google/sanitizers is archived because it was merged into LLVM sanitizers. https://github.com/google/sanitizers/ : > The Sanitizers project, which includes AddressSanitizer, MemorySanitizer, ThreadSanitizer,…
  2. …without explicit synchronization in the application (or something along those lines)..! [1] https://github.com/google/sanitizers/wiki/ThreadSanitizerAbo...
    comment by kiitos · 2025-06-02 · in Atomics and Concurrency
  3. …noticed it and deliberately exempted it, then obviously it doesn't consider it a data race. [1] https://github.com/google/sanitizers/wiki/ThreadSanitizerFla...
    comment by dataflow · 2025-06-02 · in Atomics and Concurrency
  4. …to possibly provide here, but I'm done. [1] https://clang.llvm.org/docs/ThreadSanitizer.html [2] https://github.com/google/sanitizers/wiki/threadsanitizercpp... [3] https://godbolt.org/z/EjWWac1bG
    comment by dataflow · 2025-06-01 · in Atomics and Concurrency
  5. …scanf (or some other random standard lib function). Though since 2015, it certainly has been. https://github.com/google/sanitizers/issues/108 The simpler policy of "don't allow unintialized locals when declared" would also have caught it…
  6. The Address Sanitizer (ASAN) in both clang and gcc is/are excellent: https://github.com/google/sanitizers/wiki/addresssanitizer I believe to integrate a custom allocator with ASAN, you need to look at the memory "poisoning" mechanisms:…
    comment by lsllc · 2025-01-09 · in Writing a simple pool allocator in C
  7. …<sanitizer/asan_interface.h> or the underlying intrinsics __asan_{un,}poison_memory_region. [1] https://github.com/google/sanitizers/wiki/AddressSanitizerMa...
    comment by mananaysiempre · 2025-01-09 · in Writing a simple pool allocator in C
  8. …to be in good shape, and projects that don't tend to take a long time to make any progress on. [0] https://github.com/google/sanitizers
    comment by jcalabro · 2024-11-26 · in The two factions of C++
  9. …libraries to get the compiler support for detection or whether binary instrumentation is better ( https://github.com/google/sanitizers/wiki/AddressSanitizerLe... )
  10. Address/MemorySanitizer are also meant for this kind of problem. https://github.com/google/sanitizers/wiki/AddressSanitizer https://github.com/google/sanitizers/wiki/MemorySanitizer Also valgrind, but I'm more familiar with the first two.
  11. …Are there any use cases that people here have experienced where Valgrind is their first choice? [1] https://github.com/google/sanitizers
    comment by turtledragonfly · 2024-08-28 · in Twenty Years of Valgrind (2022)
  12. …testing and introduces 128-512 bytes of overhead for every 8 bytes of memory under test: https://github.com/google/sanitizers/wiki/ThreadSanitizerAlg... . Is it cool and underrated? Definitely. But it's not a silver bullet and honestly…
  13. …(debug symbols are only loaded when used). Usual exceptions apply as you encounter them. [1] https://github.com/google/sanitizers/issues/857
    comment by ho_schi · 2024-05-11 · in Trip C++Now 2024 – think-cell
  14. …a 64 GB machine I have to reduce the amount of parallelism not to trigger Linux OoM killer. MSAN: https://github.com/google/sanitizers/wiki/MemorySanitizer
    comment by yaantc · 2024-03-20 · in I Improved My Rust Compile Times
  15. …https://github.com/KDE/heaptrack https://elinux.org/Electric_Fence https://github.com/google/sanitizers/wiki
    comment by andrewfromx · 2023-11-18 · in Ask HN: Are There Viewers for Memory Layout?
  16. …was virtual-memory tagging somewhere in there, too. [1] https://foldoc.org/Big+bag+of+pages [2] https://github.com/google/sanitizers/wiki/AddressSanitizerAl... [3] https://v8.dev/blog/oilpan-pointer-compression
  17. …malloc a fresh stack for every function call" so that you can really catch stack use after return https://github.com/google/sanitizers/wiki/AddressSanitizerUs... I'm not deeply familiar with either ThreadSanitizer or Helgrind. The TSan…
  18. …happy to answer any other questions =) [0] https://verdagon.dev/blog/generational-references [1] https://github.com/google/sanitizers/wiki/AddressSanitizer [3] https://verdagon.dev/blog/zero-cost-borrowing-regions-overvi... [4]…
  19. …As to clang’s Address Sanitizer, that’s under the Apache License v2.0 with LLVM Exceptions ( https://github.com/google/sanitizers/blob/master/LICENSE.TXT ), of which the same page says: “The original Apache license was similar to the…
  20. …https://alexgaynor.net/2020/may/27/science-on-memory-unsafet... https://github.com/google/sanitizers/blob/master/hwaddress-s... https://security.googleblog.com/2022/12/memory-safe-language...
    comment by jameswryan · 2023-02-27 · in Will Carbon Replace C++?
  21. …with Purify. Anyway, I would think the gold standard these days is clang's Address Sanitizer ( https://github.com/google/sanitizers/wiki/AddressSanitizer ). clang/ASAN also runs on Mac in addition to Linux.
  22. …C and C++ code base that will live a long while. Tools like this help and they should be used. [1] https://github.com/google/sanitizers/ [2] https://codechecker.readthedocs.io/en/latest/
  23. …`rr` as suggested by @tux3, it's great for debugging. Also, the sanitizers for GCC and Clang ( https://github.com/google/sanitizers ), and the Clang static analyzer (and tidy too) through CodeChecker ( https://codechecker.readthedocs.io/…
    comment by yaantc · 2022-07-27 · in Twenty years of Valgrind
  24. …sub-tool - there are others, like Cachegrind, which is a cache and branch-prediction profiler. https://github.com/google/sanitizers/wiki/AddressSanitizerCo... https://github.com/google/sanitizers/wiki/MemorySanitizer…
    comment by Jason_Gibson · 2022-07-26 · in Twenty years of Valgrind
  25. …with one another[0], you literally can't run with both asan and msan, or asan and tsan. [0] https://github.com/google/sanitizers/issues/1039
    comment by masklinn · 2022-06-23 · in How safe is Zig?
  26. There is ASAN https://github.com/google/sanitizers/wiki/AddressSanitizer which may work for stack variable though.
    comment by renox · 2022-02-09 · in Some mistakes Rust doesn't catch
  27. …edges and (last I knew) are not considered production ready by the sanitizers team. For example: https://github.com/google/sanitizers/issues/1324
  28. …What about use after returns? Memory leaks? Cycles? Stack under/over-flows And more from https://github.com/google/sanitizers/wiki/AddressSanitizerCo...
    comment by The_rationalist · 2021-03-22 · in How Safe Is Zig?
  29. Do you fuzz your code or use something like asan/msan ( https://github.com/google/sanitizers )? If not, how do you know that your code is really bug free?
  30. …makes this tool.</biased opinion> I've also had good luck with the memory and address sanitizers ( https://github.com/google/sanitizers ) and tools like valgrind. > C++ added in smart pointers to its specification. Are there any plans to…
  31. …able to run TSan it'll really shine a light on your code and will help you sleep more easily. ( https://github.com/google/sanitizers/wiki/ThreadSanitizerCpp... , currently built into clang I believe)
  32. …experience with things like Scons/Ninja? For the sanitizers, I had a look at the one from google: https://github.com/google/sanitizers Did you work with any of those, or was it something else? I definitely have my eyes on CLion, I'll have…
    comment by HerrmannM · 2020-01-15 · in Ask HN: Ressources to update old C++ skills
  33. …for applications using CUDA because CUDA and sanitizers don't play well together (for example, see https://github.com/google/sanitizers/issues/629 ). but indeed, the sanitizers are soooo much faster :)
  34. Yeah, you "only" need to avoid undefined behavior. What do we need ASAN/UBSAN for then? https://github.com/google/sanitizers/ Sure, Google is primarily a C++ shop, you could say that C++ is to blame and it has nothing to do with C. But why…
  35. …only on the source code of the program. Sanitizers are dynamic analysis based on instrumentation. https://github.com/google/sanitizers/wiki/AddressSanitizer The tool consists of a compiler instrumentation module (currently, an LLVM pass)…
    comment by the_why_of_y · 2019-03-10 · in MathML in Chromium
  36. …user? (4) What is the observed slowdown in real-world applications? Or benchmarks like these: https://github.com/google/sanitizers/wiki/AddressSanitizerPe...
  37. …has much use any more. You are almost always better off with one of the now built-in "sanitizers": https://github.com/google/sanitizers/wiki/AddressSanitizerCo... . But while you should be using these to catch bugs, neither the sanitizers…
    comment by nkurz · 2018-12-02 · in Undefined Behavior Is Really Undefined
  38. The Apple LLVM 9.0 still does not support LeakSanitizer, but document in https://github.com/google/sanitizers/wiki/AddressSanitizerLe... show it supports x86 OSX, holy shit!
    comment by ryancheung · 2018-03-13 · in LLVM 6.0.0 Release
  39. …approach to detect memory-related (including stack overflow) errors in C and C++ programs. See https://github.com/google/sanitizers/wiki/AddressSanitizer
  40. …to a deleted object) at a higher cost . . . can also be used to test C++. For example, we use https://github.com/google/sanitizers a lot at the office to detect these sorts of errors. Still, an interesting and clever result. Nicely done!
  41. …better for my work. I have been following a clang bug[1] for long and have seen no fix so far. [0] https://github.com/google/sanitizers/wiki/AddressSanitizer [1] https://bugs.llvm.org/show_bug.cgi?id=23910
    comment by pksadiq · 2017-09-21 · in Building the Linux kernel with clang
  42. Not sure if this is exactly what you are asking, but there's tsan (ThreadSanitizer): https://github.com/google/sanitizers/wiki/ThreadSanitizerCpp...
    comment by rrdharan · 2017-06-08 · in A formal kernel memory-ordering model
  43. …var1[2] = (int *)malloc(10); int *var2 = var1[2] + 4; var2--; free(var2 - 3); free(var1); :) [1] https://github.com/google/sanitizers [2] shameless plug: https://github.com/duneroadrunner/SaferCPlusPlus
    comment by duneroadrunner · 2017-04-13 · in The Safe C Library (2009)
  44. …Yeah, unfortunately I'm not selling anything, otherwise there would be marketing budget :) [1] https://github.com/google/sanitizers/wiki/AddressSanitizerIn...
    comment by duneroadrunner · 2016-10-21 · in OpenSSL after Heartbleed
  45. …should be much safer. Let the user choose? Not the ultimate solution, but for the short term. [0] https://github.com/google/sanitizers/wiki/AddressSanitizer
    comment by duneroadrunner · 2016-09-26 · in OpenSSL Security Advisory - 26 Sep 2016
  46. …The Libfuzzer developer was quite interested in this and has now adopted new mutation strategies: https://github.com/google/sanitizers/issues/710
  47. …strange, as it's split between a Google Wiki on Github and Clang, while the source is in LLVM: https://github.com/google/sanitizers/wiki/ThreadSanitizerCpp... http://clang.llvm.org/docs/ThreadSanitizer.html…
    comment by nkurz · 2016-08-06 · in Notes on concurrency bugs
  48. …edia.org/wiki/Cyclone_%28programming_languag... http://elinux.org/Electric_Fence http://valgrind.org/ https://github.com/google/sanitizers https://en.wikipedia.org/wiki/List_of_tools_for_static_code_...
    comment by GregBuchholz · 2016-05-04 · in OpenSSL Security Advisory
  49. …now have Address Sanitizer support for fast memory error detection. About a 2x slowdown [1]. 0. https://github.com/google/sanitizers/wiki/AddressSanitizer 1. https://github.com/google/sanitizers/wiki/AddressSanitizerPe...
    comment by neopallium · 2016-01-15 · in A critique of "How to C in 2016"