Skip to content

Mitigate VMMethod::validatedId() crash#453

Open
zhengyu123 wants to merge 1 commit intomainfrom
zgu/validatedid
Open

Mitigate VMMethod::validatedId() crash#453
zhengyu123 wants to merge 1 commit intomainfrom
zgu/validatedid

Conversation

@zhengyu123
Copy link
Copy Markdown
Contributor

@zhengyu123 zhengyu123 commented Apr 7, 2026

What does this PR do?:
Mitigate VMMethod::validatedId() crash with 1.60.4

Motivation:
Avoid invalid jmethodId crashes JVM.

Additional Notes:
Early mitigation did not cover following check:
*(VMMethod**)method_id == this

Loading from invalid method_id results new crash.

How to test the change?:

  • CI tests

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-13947

Unsure? Have a question? Request a review!

@dd-octo-sts
Copy link
Copy Markdown

dd-octo-sts bot commented Apr 7, 2026

Scan-Build Report

User:runner@runnervm727z3
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:Tue Apr 7 20:04:29 2026

Bug Summary

Bug TypeQuantityDisplay?
All Bugs1
Logic error
Stack address stored into global variable1

Reports

Bug Group Bug Type ▾ File Function/Method Line Path Length
Logic errorStack address stored into global variablestackWalker.cppwalkVM84837

@zhengyu123 zhengyu123 changed the title Fix VMMethod::validatedId() crash Mitigate VMMethod::validatedId() crash Apr 7, 2026
@dd-octo-sts
Copy link
Copy Markdown

dd-octo-sts bot commented Apr 7, 2026

CI Test Results

Run: #24101747062 | Commit: 5d1cf62 | Duration: 21m 25s (longest job)

All 32 test jobs passed

Status Overview

JDK glibc-aarch64/debug glibc-amd64/debug musl-aarch64/debug musl-amd64/debug
8 - - -
8-ibm - - -
8-j9 - -
8-librca - -
8-orcl - - -
11 - - -
11-j9 - -
11-librca - -
17 - -
17-graal - -
17-j9 - -
17-librca - -
21 - -
21-graal - -
21-librca - -
25 - -
25-graal - -
25-librca - -

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

Summary: Total: 32 | Passed: 32 | Failed: 0


Updated: 2026-04-07 20:39:43 UTC

@zhengyu123 zhengyu123 marked this pull request as ready for review April 7, 2026 20:48
@zhengyu123 zhengyu123 requested a review from a team as a code owner April 7, 2026 20:48
@zhengyu123 zhengyu123 requested review from jbachorik and rkennke April 7, 2026 20:48
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.

1 participant