Skip to content

Tweak compilation flags #11

Tweak compilation flags

Tweak compilation flags #11

name: Test for memory leaks
on: [push]
jobs:
test-memcheck:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: 3.4.0-preview1 # TODO: Use stable version once 3.4 is out
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
bundler: latest
cache-version: v1 # bump this to invalidate cache
- run: sudo apt install -y valgrind && valgrind --version
- run: bundle exec rake compile spec:profiling:memcheck
test-asan:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: datadog/setup-ruby@0c7206d6db81faf999795ceebfac00d164298bd5
with:
ruby-version: asan
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
bundler: latest
cache-version: v1 # bump this to invalidate cache
- run: env CC=clang-18 CONFIGURE_ARGS="--with-cflags='-DENABLE_PATH_CHECK=0 -DRUBY_DEBUG=1 -DVM_CHECK_MODE=1 -DUSE_MN_THREADS=0 -fsanitize=address -fno-omit-frame-pointer'" bundle exec rake compile && env RUBY_FREE_AT_EXIT=1 LSAN_OPTIONS=verbosity=0:log_threads=1 ASAN_OPTIONS=detect_leaks=1 bundle exec rake spec:profiling:all