Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: DataDog/java-profiler
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: DataDog/java-profiler
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: release/1.40._
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 2 commits
  • 10 files changed
  • 2 contributors

Commits on Mar 22, 2026

  1. Fix memfd_create build failure on CentOS 7 / glibc < 2.27

    Add #ifndef guards for MFD_CLOEXEC and MFD_ALLOW_SEALING, and a
    syscall-based memfd_create fallback for systems without the libc wrapper.
    
    Co-Authored-By: Claude Sonnet 4.6 (1M context) <[email protected]>
    jbachorik and claude committed Mar 22, 2026
    Configuration menu
    Copy the full SHA
    ed09ee7 View commit details
    Browse the repository at this point in the history

Commits on Mar 27, 2026

  1. fix(sigaction): prevent infinite loop in signal handler chaining (#437)…

    … (#447)
    
    * fix(sigaction): prevent infinite loop in signal handler chaining
    
    When intercepting sigaction calls from other libraries (e.g., wasmtime),
    we were returning our handler as oldact. This caused infinite loops:
      profiler -> wasmtime -> profiler -> wasmtime -> ...
    
    Fix: Save original (JVM's) handlers in protectSignalHandlers() BEFORE
    installing ours, then return those saved handlers as oldact. Now the
    chain is: profiler -> wasmtime -> JVM
    
    Also:
    - Add sigaction_interception_ut.cpp test to catch this bug
    - Wire gtest to run before Java tests in testdebug
    - Remove broken test_tlsPriming.cpp (referenced removed APIs)
    - Add getSigactionHook() stub for macOS
    
    
    
    * fix: address PR review comments
    
    - Add missing <cstring> include for memset
    - Fix comment to match int return type (0 = not handled, non-zero = handled)
    
    
    
    * fix: close query-only sigaction loop and fix debug-mode SIGABRT
    
    Extend sigaction interception to cover query-only calls
    (sigaction(SIGSEGV/SIGBUS, nullptr, &oldact)): return the saved JVM
    handler instead of ours, so callers that store oldact and later chain
    to it don't loop back into our handler.
    
    Fix intermittent SIGABRT in debug builds on aarch64 GraalVM: extend
    crashProtectionActive() with a VMThread::isExceptionActive() fallback
    so the cast_to() assert no longer fires for threads without ProfiledThread
    TLS when setjmp crash protection is already active in walkVM.
    
    Add OS::resetSignalHandlersForTesting() to prevent static state from
    leaking between sigaction interception unit tests.
    
    Add ASCII flow diagram to sigaction_hook documenting the full handler
    chain and interception cases.
    
    
    
    ---------
    
    
    (cherry picked from commit 312fc25)
    
    Co-authored-by: Claude Opus 4.5 <[email protected]>
    jbachorik and claude authored Mar 27, 2026
    Configuration menu
    Copy the full SHA
    0114dbc View commit details
    Browse the repository at this point in the history
Loading