Comments (2)
MSVC sanitizers are not ready.
ASanitizer is of little use in a statically-sized numbers library anyway. Also, it doesn't appear to run reliably.
UBSan doesn't exist yet.
A few checks are available using the /RTC
flags but they are not unit-test friendly. They could be enabled with
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index dd8550ae..f3774f6d 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -298,8 +298,11 @@ jobs:
- name: Install dependencies
working-directory: ${{runner.workspace}}/build
run: |
+ $sanitize = ("${{matrix.build_type}}" -eq "Debug")
+ echo $sanitize
conan install `
--build=missing `
+ --options sanitize=$sanitize `
--profile:build $env:GITHUB_WORKSPACE/.github/conan/profiles/${{matrix.build-profile}} `
--profile:host $env:GITHUB_WORKSPACE/.github/conan/profiles/${{matrix.host-profile}} `
--settings:build build_type=Release `
diff --git a/test/toolchain/msvc.cmake b/test/toolchain/msvc.cmake
index 2dd2bc66..73b398aa 100644
--- a/test/toolchain/msvc.cmake
+++ b/test/toolchain/msvc.cmake
@@ -6,4 +6,6 @@ set(EXCEPTION_DISABLED_FLAGS "/GR- -DBOOST_NO_EXCEPTIONS -DBOOST_NO_RTTI")
set(INT128_ENABLED_FLAGS "")
set(INT128_DISABLED_FLAGS "")
+set(SANITIZE_ENABLED_CXX_FLAGS "/RTCcsu -D_ALLOW_RTCc_IN_STL")
+
set(SAMPLE_CXX_FLAGS "/wd4018")
but this triggers dialogues inside tests designed to illustrate UB or test that sanitizers trap.
from cnl.
AddressSanitizer changes (as far as I got):
diff --git a/test/toolchain/msvc.cmake b/test/toolchain/msvc.cmake
index 2dd2bc66..12050502 100644
--- a/test/toolchain/msvc.cmake
+++ b/test/toolchain/msvc.cmake
@@ -6,4 +6,7 @@ set(EXCEPTION_DISABLED_FLAGS "/GR- -DBOOST_NO_EXCEPTIONS -DBOOST_NO_RTTI")
set(INT128_ENABLED_FLAGS "")
set(INT128_DISABLED_FLAGS "")
+set(SANITIZE_ENABLED_CXX_FLAGS "/fsanitize=address /fsanitize-address-use-after-return /INCREMENTAL:NO /Zi")
+set(SANITIZE_ENABLED_LINKER_FLAGS "/DEBUG")
+
set(SAMPLE_CXX_FLAGS "/wd4018")
from cnl.
Related Issues (20)
- Poor performance when using composition of core numeric types HOT 12
- v1.1.7 crash after multiplication HOT 1
- Publishing CNL 1.x libraries to platformio HOT 3
- Serialization. HOT 3
- Missing rounding conversion operators HOT 1
- Simplify `__int128` support. HOT 1
- CMake via Conan? HOT 1
- Add base parameter to to_chars HOT 2
- Only build CNL as Debug HOT 1
- to_chars_static allocates buffer too small for -ve numbers HOT 1
- Replace CMAKE_TOOLCHAIN_FILE with CMAKE_PROJECT_INCLUDE_BEFORE HOT 4
- How to use as scaled decimal number (1.x) HOT 6
- Don't reopen std::
- remove cnl/bit.h
- Clang-Tidy won't re-run when .clang-tidy changes
- ensure FetchContent-able
- Put slowest tests first
- the godbolt link in the readme does not compile
- Build error on v1.1.2: redefinition of βstruct std::hash<std::filesystem::__cxx11::path>β HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cnl.