Skip to content

Commit

Permalink
add an asan CI Test
Browse files Browse the repository at this point in the history
  • Loading branch information
mmomtchev committed Oct 3, 2024
1 parent 86ca17c commit 8ee483d
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/test-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -229,3 +229,22 @@ jobs:
directory: ${{ github.workspace }}/coverage
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true


asan:
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v4
- name: Use Node.js 18.x
uses: actions/setup-node@v4
with:
node-version: 18.x
- run: npm install --ignore-scripts
- run: npx @mapbox/node-pre-gyp configure --debug --enable_asan
- run: npx @mapbox/node-pre-gyp build -j max
- run: npm test
env:
MOCHA_REPEAT: 10
LD_PRELOAD: /usr/lib/x86_64-linux-gnu/libasan.so.6
LSAN_OPTIONS: suppressions=${{ github.workspace }}/test/napi-leaks-suppression.txt
29 changes: 29 additions & 0 deletions test/napi-leaks-suppression.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# All leaks listed here are non-repeat offenders
# (ie they happen only a fixed number of times per process execution)

# Known leaks in Node-API
leak:napi_module_register
leak:napi_register_module_v1

# Known leaks in the Node.js runtime
leak:node::builtins::BuiltinLoader::LoadBuiltinSource
leak:ProcessWrap::OnExit
leak:StringBytes::Encode
leak:Realm::ExecuteBootstrapper

# Known leaks in V8
leak:Heap_GenerationalBarrierSlow
leak:Scavenger::ScavengePage
leak:Scavenger::Process
leak:CompactionSpace::Expand
leak:Heap::IterateRoots
leak:Heap::PerformGarbageCollection
leak:Heap::InsertIntoRememberedSetFromCode
leak:Heap::SetUpSpaces
leak:Heap::PerformGarbageCollection
leak:PagedSpace::RefillLabMain
leak:OldLargeObjectSpace::AllocateRaw
leak:BaselineBatchCompiler::EnqueueFunction
leak:Compiler::FinalizeTurbofanCompilationJob
leak:v8::internal::Factory::CodeBuilder::Build
leak:v8::internal::MemoryChunk::RegisterObjectWithInvalidatedSlots

0 comments on commit 8ee483d

Please sign in to comment.