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
20082026
-
…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,…
comment by westurner · 2025-11-23 · in Windows ARM64 Internals: Deconstructing Pointer Authentication -
…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 -
…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 -
…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 -
…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…
comment by hoten · 2025-04-23 · in How a 20 year old bug in GTA San Andreas surfaced in Windows 11 24H2 -
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 -
…<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 -
…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++ -
…libraries to get the compiler support for detection or whether binary instrumentation is better ( https://github.com/google/sanitizers/wiki/AddressSanitizerLe... )
comment by manwe150 · 2024-09-22 · in Logging all C++ destructors, poor mans run-time tracing -
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.
comment by jprete · 2024-09-21 · in Logging all C++ destructors, poor mans run-time tracing -
…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) -
…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…
comment by weitendorf · 2024-07-05 · in The sad state of property-based testing libraries -
…(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 -
…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 -
…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? -
…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
comment by mananaysiempre · 2023-10-27 · in Shadow: New browser engine made almost entirely in JavaScript -
…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…
comment by nlewycky · 2023-07-23 · in Valgrind recieves a development microgrant from FUTO -
…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]…
comment by verdagon · 2023-07-12 · in Vale's first prototype for immutable region borrowing -
…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…
comment by Someone · 2023-04-17 · in OpenBSD: Malloc leak detection available in -current -
…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++? -
…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.
comment by wallstprog · 2022-12-05 · in Memory leaks detection paper co-authored by Netflix CEO Reed Hastings in 1992 [pdf] -
…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/
comment by yaantc · 2022-11-28 · in GCC undefined behaviors are getting wild -
…`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 -
…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 -
…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? -
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 -
…edges and (last I knew) are not considered production ready by the sanitizers team. For example: https://github.com/google/sanitizers/issues/1324
comment by kevinoid · 2021-08-31 · in Getting the maximum of your C compiler, for security -
…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? -
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?
comment by joshuamorton · 2020-05-24 · in Chromium project finds that 70% of security defects are memory safety problems -
…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…
comment by AaronBallman · 2020-04-14 · in Tell HN: C Experts Panel – Ask us anything about C -
…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)
comment by percentcer · 2020-04-06 · in Libcsp: a fast C concurrency library influenced by the CSP model -
…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 -
…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 :)
comment by tomnj · 2019-10-08 · in C++ Ecosystem: Compilers, IDEs, Tools, Testing -
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…
comment by butteroverflow · 2019-07-01 · in As a system programming language, C still deserves learning today -
…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 -
…user? (4) What is the observed slowdown in real-world applications? Or benchmarks like these: https://github.com/google/sanitizers/wiki/AddressSanitizerPe...
comment by felixguendling · 2019-01-13 · in Show HN: Stensal SDK: Retrofitting C/C++ code with quasi-memory-safety -
…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 -
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 -
…approach to detect memory-related (including stack overflow) errors in C and C++ programs. See https://github.com/google/sanitizers/wiki/AddressSanitizer
comment by ttd · 2017-10-23 · in Hardening C/C++ Programs: Stack Protector -
…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!
comment by 7197ghr918hf · 2017-09-28 · in Simple, Fast and Safe Manual Memory Management [pdf] -
…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 -
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 -
…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) -
…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 -
…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 -
…The Libfuzzer developer was quite interested in this and has now adopted new mutation strategies: https://github.com/google/sanitizers/issues/710
comment by hannob · 2016-08-21 · in Fuzzing Perl: A Tale of Two American Fuzzy Lops -
…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 -
…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 -
…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"