Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[NO-TICKET] Add more memory leak testing for profiling using asan #3864

Merged
merged 2 commits into from
Aug 23, 2024

Commits on Aug 23, 2024

  1. Fix profiler not picking up VM compilation settings correctly

    See the huge comment for details :)
    ivoanjo committed Aug 23, 2024
    Configuration menu
    Copy the full SHA
    a4c7c18 View commit details
    Browse the repository at this point in the history
  2. [NO-TICKET] Add more memory leak testing for profiling using asan

    **What does this PR do?**
    
    This PR builds atop the work from #3852 and #3862 to enable running
    the profiler test suite using the AddressSanitizer ("asan") tool
    (see https://github.com/google/sanitizers/wiki/AddressSanitizerLeakSanitizer ).
    
    This check will enable us to find bugs in the profiler that may not
    be otherwise caught.
    
    **Motivation:**
    
    Improve validation of the profiler native extension.
    
    **Additional Notes:**
    
    The "asan" tool is built into the clang compiler toolchain, and
    needs Ruby to be built with a special configuration.
    
    The special configuration is not yet available in the upstream
    `ruby/setup-ruby` github action, so I needed to fork it and push
    a small tweak to make it available.
    
    (The Ruby builds were added in
    ruby/ruby-dev-builder#10 ).
    
    **How to test the change?**
    
    Here's a passing CI run:
    https://github.com/DataDog/dd-trace-rb/actions/runs/10524502494/job/29161364590
    
    I've also tested it by adding a memory leak (e.g. for instance
    commenting out `ddog_Vec_Tag_drop(tags);` in `http_transport.c` and
    confirmed the issue was flagged.
    
    Here's the failing CI run:
    https://github.com/DataDog/dd-trace-rb/actions/runs/10524803685/job/29162274392
    ivoanjo committed Aug 23, 2024
    Configuration menu
    Copy the full SHA
    f43b485 View commit details
    Browse the repository at this point in the history