From a682d8ade2ef41404e57ba0d5643aee761c4a4b2 Mon Sep 17 00:00:00 2001 From: Romain BOULLARD Date: Sun, 22 Feb 2026 11:36:54 +0100 Subject: [PATCH] more sanitizers --- .gitea/workflows/ci.yml | 10 ++++++++-- ConanProfiles/clangd2 | 4 ++-- ConanProfiles/clangd3 | 32 ++++++++++++++++++++++++++++++++ 3 files changed, 42 insertions(+), 4 deletions(-) create mode 100644 ConanProfiles/clangd3 diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 1d944aa..da0e546 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -27,13 +27,19 @@ jobs: name: Debug (ASAN, LSAN, UBSAN) - build_type: Debug conan_profile: ./ConanProfiles/clangd2 - name: Debug (TSAN, MSAN) + name: Debug (TSAN) + - build_type: Debug + conan_profile: ./ConanProfiles/clangd3 + name: Debug (MSAN) - build_type: RelWithDebInfo conan_profile: ./ConanProfiles/clangd name: RelWithDebInfo (ASAN, LSAN, UBSAN) - build_type: RelWithDebInfo conan_profile: ./ConanProfiles/clangd2 - name: RelWithDebInfo (TSAN, MSAN) + name: RelWithDebInfo (TSAN) + - build_type: RelWithDebInfo + conan_profile: ./ConanProfiles/clangd3 + name: RelWithDebInfo (MSAN) name: "Build & Test ${{ matrix.name }}" steps: - name: Install Node.js diff --git a/ConanProfiles/clangd2 b/ConanProfiles/clangd2 index fddd5be..64321a1 100644 --- a/ConanProfiles/clangd2 +++ b/ConanProfiles/clangd2 @@ -11,8 +11,8 @@ build_type=Debug [conf] tools.cmake.cmaketoolchain:extra_variables={'CMAKE_CXX_COMPILER_LAUNCHER': 'ccache', 'CMAKE_C_COMPILER_LAUNCHER': 'ccache'} -tools.cmake.cmaketoolchain:extra_variables*={'BIN2CPP_CXX_FLAGS': {'value': '-Wall;-Wextra;-Wpedantic;-Werror;-fsanitize=memory,thread;-fno-sanitize-recover=all', 'cache': True, 'type': 'STRING', 'docstring': 'CXX flags for Bin2CPP', 'force': True}} -tools.cmake.cmaketoolchain:extra_variables*={'BIN2CPP_EXE_LINK_FLAGS': {'value': '-fsanitize=memory,thread', 'cache': True, 'type': 'STRING', 'docstring': 'EXE link flags for Bin2CPP', 'force': True}} +tools.cmake.cmaketoolchain:extra_variables*={'BIN2CPP_CXX_FLAGS': {'value': '-Wall;-Wextra;-Wpedantic;-Werror;-fsanitize=thread;-fno-sanitize-recover=all', 'cache': True, 'type': 'STRING', 'docstring': 'CXX flags for Bin2CPP', 'force': True}} +tools.cmake.cmaketoolchain:extra_variables*={'BIN2CPP_EXE_LINK_FLAGS': {'value': '-fsanitize=thread', 'cache': True, 'type': 'STRING', 'docstring': 'EXE link flags for Bin2CPP', 'force': True}} tools.system.package_manager:mode=install tools.system.package_manager:sudo=True diff --git a/ConanProfiles/clangd3 b/ConanProfiles/clangd3 new file mode 100644 index 0000000..7050f4c --- /dev/null +++ b/ConanProfiles/clangd3 @@ -0,0 +1,32 @@ +[settings] +os=Linux +arch=x86_64 +compiler=clang +compiler.version=20 +compiler.libcxx=libstdc++11 +compiler.cppstd=20 +compiler.cstd=17 +compiler.runtime=static +build_type=Debug + +[conf] +tools.cmake.cmaketoolchain:extra_variables={'CMAKE_CXX_COMPILER_LAUNCHER': 'ccache', 'CMAKE_C_COMPILER_LAUNCHER': 'ccache'} +tools.cmake.cmaketoolchain:extra_variables*={'BIN2CPP_CXX_FLAGS': {'value': '-Wall;-Wextra;-Wpedantic;-Werror;-fsanitize=memory;-fno-sanitize-recover=all', 'cache': True, 'type': 'STRING', 'docstring': 'CXX flags for Bin2CPP', 'force': True}} +tools.cmake.cmaketoolchain:extra_variables*={'BIN2CPP_EXE_LINK_FLAGS': {'value': '-fsanitize=memory', 'cache': True, 'type': 'STRING', 'docstring': 'EXE link flags for Bin2CPP', 'force': True}} + +tools.system.package_manager:mode=install +tools.system.package_manager:sudo=True + +tools.build:exelinkflags=["-fuse-ld=mold"] +tools.build:sharedlinkflags=["-fuse-ld=mold"] + +tools.cmake.cmaketoolchain:generator=Ninja + +tools.build:compiler_executables={"c": "clang", "cpp": "clang++"} + +[tool_requires] +!cmake/*: cmake/[>=4.2] + +[options] +Bin2CPP/*:asan=True +Bin2CPP/*:build_tests=True \ No newline at end of file