From 11dc4b050c75575a6bc475c32ad1e0652989d5cf Mon Sep 17 00:00:00 2001 From: srz_zumix Date: Tue, 11 May 2021 22:13:29 +0900 Subject: [PATCH 1/6] sanitizer --- test/GNUmakefile | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/test/GNUmakefile b/test/GNUmakefile index 6d00dc8e57..787115e05b 100644 --- a/test/GNUmakefile +++ b/test/GNUmakefile @@ -62,6 +62,25 @@ CCOV=$(USE_COVERAGE) endif endif +ifdef USE_ASAN +IUTEST_CXX_SANITIZE_FLAG=-fsanitize=address +endif +ifdef USE_TSAN +IUTEST_CXX_SANITIZE_FLAG=-fsanitize=thread +endif +ifdef USE_MSAN +IUTEST_CXX_SANITIZE_FLAG=-fsanitize=memory +endif +ifdef USE_UBSAN +ifeq (${IUTEST_CXX_SANITIZE_FLAG},) +IUTEST_CXX_SANITIZE_FLAG=-fsanitize=undefined +else +IUTEST_CXX_SANITIZE_FLAG:=${IUTEST_CXX_SANITIZE_FLAG},undefined +endif +endif + +override CXXFLAGS += ${IUTEST_CXX_SANITIZE_FLAG} + ifdef GGC_MIN_EXPAND override CXXFLAGS += --param ggc-min-expand=${GGC_MIN_EXPAND} endif From c4903fe52447bbb0160706513bb8256a3da61d28 Mon Sep 17 00:00:00 2001 From: srz_zumix Date: Wed, 12 May 2021 20:16:31 +0900 Subject: [PATCH 2/6] add asan job --- .github/workflows/main.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d77a573ade..631690d7fd 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -155,6 +155,28 @@ jobs: - name: build run: | make -C test DEFS="$DEFS" + + sanitizer: + runs-on: ubuntu-latest + env: + CC: clang + CXX: clang++ + needs: prepare + steps: + - uses: actions/checkout@v2 + - name: info + run: | + make -C test showcxxversion showcxxmacros DEFS="$DEFS" + - name: asan + run: | + make -C test USE_ASAN=1 USE_UBSAN=1 test + - name: msan + run: | + make -C test USE_MSAN=1 USE_UBSAN=1 test + - name: tsan + run: | + make -C test USE_TSAN=1 USE_UBSAN=1 test + lint-editorconfig: runs-on: ubuntu-18.04 needs: prepare From 5353dd36dcf94cbacd1c480a71176d0f05e54170 Mon Sep 17 00:00:00 2001 From: srz_zumix Date: Sat, 15 May 2021 16:20:00 +0900 Subject: [PATCH 3/6] release combine generators --- include/internal/iutest_genparams.hpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/include/internal/iutest_genparams.hpp b/include/internal/iutest_genparams.hpp index b4f3985c46..6bd8adb691 100644 --- a/include/internal/iutest_genparams.hpp +++ b/include/internal/iutest_genparams.hpp @@ -489,10 +489,25 @@ class iuCartesianProductGenerator IUTEST_CXX_FINAL : public iuIParamGenerator< t return tuples::tuple(tuples::get(v).GetCurrent()); } + template + void release_foreach( + typename detail::enable_if::type*& = detail::enabler::value ) const + { + delete tuples::get(v); + release_foreach(); + } + template + void release_foreach( + typename detail::enable_if::type*& = detail::enabler::value ) const + { + delete tuples::get(v); + } + public: typedef tuples::tuple ParamType; public: iuCartesianProductGenerator() {} + ~iuCartesianProductGenerator() { release_foreach<0, kCount>(); } public: virtual void Begin() IUTEST_CXX_OVERRIDE From 3129d3d26f7212c69f54da212c277c64fcae95a3 Mon Sep 17 00:00:00 2001 From: srz_zumix Date: Tue, 18 May 2021 11:57:47 +0900 Subject: [PATCH 4/6] comment out --- .github/workflows/main.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 631690d7fd..f28b8f05a7 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -167,9 +167,9 @@ jobs: - name: info run: | make -C test showcxxversion showcxxmacros DEFS="$DEFS" - - name: asan - run: | - make -C test USE_ASAN=1 USE_UBSAN=1 test + # - name: asan + # run: | + # make -C test USE_ASAN=1 USE_UBSAN=1 test - name: msan run: | make -C test USE_MSAN=1 USE_UBSAN=1 test From ce016f0a52381e7b0ee26ae88db2c64f98e1f4b5 Mon Sep 17 00:00:00 2001 From: srz_zumix Date: Sat, 22 May 2021 16:31:43 +0900 Subject: [PATCH 5/6] tsan --- .github/workflows/main.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f28b8f05a7..cce21b0ea0 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -170,12 +170,12 @@ jobs: # - name: asan # run: | # make -C test USE_ASAN=1 USE_UBSAN=1 test - - name: msan - run: | - make -C test USE_MSAN=1 USE_UBSAN=1 test - name: tsan run: | make -C test USE_TSAN=1 USE_UBSAN=1 test + - name: msan + run: | + make -C test USE_MSAN=1 USE_UBSAN=1 test lint-editorconfig: runs-on: ubuntu-18.04 From ae207fd4b8a483b8f41b83de53b95eb8ba2b40cb Mon Sep 17 00:00:00 2001 From: srz_zumix Date: Sat, 22 May 2021 20:48:25 +0900 Subject: [PATCH 6/6] fix --- .github/workflows/main.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index cce21b0ea0..0ad75bc9d0 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -169,13 +169,16 @@ jobs: make -C test showcxxversion showcxxmacros DEFS="$DEFS" # - name: asan # run: | + # make -C test clean # make -C test USE_ASAN=1 USE_UBSAN=1 test - name: tsan run: | + make -C test clean make -C test USE_TSAN=1 USE_UBSAN=1 test - - name: msan - run: | - make -C test USE_MSAN=1 USE_UBSAN=1 test + # - name: msan + # run: | + # make -C test clean + # make -C test USE_MSAN=1 USE_UBSAN=1 test lint-editorconfig: runs-on: ubuntu-18.04