From 1264045ad8f7733889624c01e63183b6ac8cbd59 Mon Sep 17 00:00:00 2001 From: Matheus Marchini Date: Fri, 10 Apr 2020 16:07:52 -0700 Subject: [PATCH 1/2] build: use same flags as V8 for ASAN Signed-off-by: Matheus Marchini --- common.gypi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/common.gypi b/common.gypi index d39668b100d33c..fb364b55f5e63e 100644 --- a/common.gypi +++ b/common.gypi @@ -284,8 +284,9 @@ 'cflags+': [ '-fno-omit-frame-pointer', '-fsanitize=address', - '-DLEAK_SANITIZER' + '-fsanitize-address-use-after-scope', ], + 'defines': [ 'LEAK_SANITIZER', 'V8_USE_ADDRESS_SANITIZER' ], 'cflags!': [ '-fomit-frame-pointer' ], 'ldflags': [ '-fsanitize=address' ], }], From c39affde9eee0f9bdf1c316c0786e4e17adb2010 Mon Sep 17 00:00:00 2001 From: Matheus Marchini Date: Fri, 20 Mar 2020 18:26:14 -0700 Subject: [PATCH 2/2] build: re-enable ASAN Action using clang clang's linker seems to use considerably less memory than gcc, allowing us to run on Actions without running out of memory. Signed-off-by: Matheus Marchini --- .github/workflows/test-asan.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/test-asan.yml diff --git a/.github/workflows/test-asan.yml b/.github/workflows/test-asan.yml new file mode 100644 index 00000000000000..56ad55f6735804 --- /dev/null +++ b/.github/workflows/test-asan.yml @@ -0,0 +1,28 @@ +name: test-asan + +on: [push, pull_request] + +env: + PYTHON_VERSION: 3.8 + FLAKY_TESTS: dontcare + +jobs: + test-asan: + runs-on: ubuntu-latest + env: + CC: clang + CXX: clang++ + LINK: clang++ + CONFIG_FLAGS: --enable-asan + steps: + - uses: actions/checkout@v2 + - name: Set up Python ${{ env.PYTHON_VERSION }} + uses: actions/setup-python@v1 + with: + python-version: ${{ env.PYTHON_VERSION }} + - name: Environment Information + run: npx envinfo + - name: Build + run: make build-ci -j2 V=1 + - name: Test cctest + run: make cctest -j2 V=1