Skip to content

Mitigating VMMethod::id() crash#359

Merged
zhengyu123 merged 2 commits intomainfrom
zgu/validatedId
Feb 6, 2026
Merged

Mitigating VMMethod::id() crash#359
zhengyu123 merged 2 commits intomainfrom
zgu/validatedId

Conversation

@zhengyu123
Copy link
Contributor

@zhengyu123 zhengyu123 commented Feb 6, 2026

What does this PR do?:
Mitigating VMMethod::id() crashes in latest release.

Motivation:
Currently, crash tracker report does not provide sufficient information to identify the root cause. While we are waiting for DataDog/dd-trace-java #10544 Preserve the function relative address when parsing a crash to gather more information to solve the mysteries, let's provide a mitigation for this crash.

Other than SafeAccesss inside VMMethod::id() method, VMMethod* can be invalid, e.g. points to unmapped memory, let's validates the memory before the access.

Additional Notes:

How to test the change?:
-Regular tests
-New gtest to verify new SafeAccess::isReadable()

For Datadog employees:

  • If this PR touches code that signs or publishes builds or packages, or handles
    credentials of any kind, I've requested a review from @DataDog/security-design-and-guidance.
  • This PR doesn't touch any of that.
  • JIRA: PROF-13655

Unsure? Have a question? Request a review!

@zhengyu123 zhengyu123 changed the title Mitigating VMMethod::id() crash WIP: Mitigating VMMethod::id() crash Feb 6, 2026
@dd-octo-sts
Copy link

dd-octo-sts bot commented Feb 6, 2026

Scan-Build Report

User:runner@runnervmwffz4
Working Directory:/home/runner/work/java-profiler/java-profiler/ddprof-lib/src/test/make
Command Line:make -j4 all
Clang Version:Ubuntu clang version 18.1.3 (1ubuntu1)
Date:Fri Feb 6 14:45:40 2026

Bug Summary

Bug TypeQuantityDisplay?
All Bugs1
Unused code
Dead assignment1

Reports

Bug Group Bug Type ▾ File Function/Method Line Path Length
Unused codeDead assignmentlibraryPatcher_linux.cpppatch_library_unlocked941

@dd-octo-sts
Copy link

dd-octo-sts bot commented Feb 6, 2026

CI Test Results

Run: #21754553104 | Commit: fc3bb4f | Duration: 14m 15s (longest job)

All 40 test jobs passed

Status Overview

Platform 8 8-ibm 8-j9 8-libr 8-orcl 8-zing 11 11-j9 11-lib 11-zin 17 17-gra 17-j9 17-lib 17-zin 21 21-gra 21-lib 21-zin 25 25-gra 25-lib
glibc-aarch64/debug - - - - - - - - -
glibc-amd64/debug - - - - -
musl-aarch64/debug - - - - - - - - - - - - - - - - -
musl-amd64/debug - - - - - - - - - - - - - - - - -

Legend: ✅ passed | ❌ failed | ⚪ skipped | 🚫 cancelled

Summary

Metric Value
Total jobs 40
Passed 40
Failed 0

Updated: 2026-02-06 15:01:12 UTC

@pr-commenter
Copy link

pr-commenter bot commented Feb 6, 2026

Integration Tests

All 40 integration tests passed

📊 Dashboard · 👷 Pipeline · 📦 f934669f

@zhengyu123 zhengyu123 changed the title WIP: Mitigating VMMethod::id() crash Mitigating VMMethod::id() crash Feb 6, 2026
@zhengyu123 zhengyu123 marked this pull request as ready for review February 6, 2026 15:27
@zhengyu123 zhengyu123 requested a review from a team as a code owner February 6, 2026 15:27
@zhengyu123 zhengyu123 merged commit 002f244 into main Feb 6, 2026
97 checks passed
@zhengyu123 zhengyu123 deleted the zgu/validatedId branch February 6, 2026 15:33
@github-actions github-actions bot added this to the 1.38.0 milestone Feb 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants