HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
arsenm
sanitizers-cmake
CMake2018–2022
arsenm / sanitizers-cmake

sanitizers-cmake

CMake modules to help use sanitizers

2Distinct people
2Mentions
0Explicit recommenders
412GitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

CMake modules to help use sanitizers

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 5:04:57 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year2 dated mentions

Observed mentions: 2018-02-04 19:13:10 UTC to 2022-10-19 16:37:51 UTC.

012018-01-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments20182019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments20202021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2022

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20182018-01-01 00:00:00 UTC2019-01-01 00:00:00 UTC101
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC000
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC000
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC000
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC101

What Hacker News says

2 sources
> You don't need CMake for this. You just add the relevant flags onto the specific compiler you're using, and CMake doesn't really help you with that. Meson does, at least. And you might have at least clang/msvc/gcc with different flags for address/thread/ub sanitizers. You might be in that situation. If you are, it is not worth anymore to go do it yourself. You have this for CMake, btw (do not know quality-wise): https://github.com/arsenm/sanitizers-cmake. > I don't know if I have understood your sentence right I mean this: - A uses B uses C 1.3.2 - D uses C 1.4.1 - C uses E 5.1 - F uses E 5.3 Now you have to use the same E and the same C nested dep version for both packages. This is not trivial with a realistic amount of dependencies it can get hairy very quickly. Conan deals with this. You can say: grab 5.2 and 1.3.2 and it will do the
Read the rest
thing as long as you know that those versions are actually compatible with your packages. > Overall, CMake might be nice if you are just using other people's libraries, don't really have that many customizations needed, and have relatively simple build processes (no complex custom code generation / compiler needed to be run). Are you aware that this makes your project a personal thing that others cannot use? I mean, yes, you can do that, but it is useless outside of your uses unless you either package it for Conan/Vcpkg or build it with a reasonable build system (CMake/Meson/maybe Bazel?/Scons). > the whole experience of using CMake it sucks a bit but it works and it has improved. Also, even more important, it is battle tested. But let me recommend you Meson if you hate CMake as much as I do. I work with Meson when I can. The DSL is nice and easy. A piece of cake. > it seems better to make your own that fits for your specific use-case I understand your frustration and feeling. I have been there. It is easier to drop a Makefile or something you understand quickly and it will work for you. The problem is when you start with the builds/compilers/shared vs static/sanitized and install targets dance. That makes it unfeasible to run your own solution in many cases bc you are going to make mistakes all these tools already made and corrected and they are battle-tested.
In The initial proposal for a C++ Ecosystem International Standard
I've been following for a while the CMake issue #14983 (https://gitlab.kitware.com/cmake/cmake/issues/14983), which doesn't really get much attention but affects the behavior of the feature POSITION_INDEPENDENT_CODE. As it is, it's not very reliable because it misses adding the flag '-pie' to the linker step, which AFAIK should be done to generate a proper PIE executable. All this became relevant to me while integrating some Sanitizer CMake modules in my projects: https://github.com/arsenm/sanitizers-cmake where I opened an issue to talk about the subject (https://github.com/arsenm/sanitizers-cmake/issues/13). Turns out Qt seems to depend on some obscure / not very well documented behavior of PIC instead of PIE, so their builds would break if using '-pie', or at least that's what I understood. In summary I'm amused how such a seemingly si
Read the rest
mple operation is getting so much time and complications to implement properly. I'm happy to see more conversation about this topic, because as of now it is still somewhat difficult to grasp and use correctly.
In PIC, PIE and Sanitizers

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.