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

Do not patch jmethodIDs for newer than JDK 8 #148

Merged
merged 1 commit into from
Oct 31, 2024
Merged

Conversation

jbachorik
Copy link
Collaborator

What does this PR do?:
It adds a guard for the workaround for JDK-8062116 which needs to be done only for JDK 8.

Motivation:
The workaround is mutating the class data in-memory which does not feel like an extremely safe thing to do. To make things worse, it is really not necessary for anything newer than Java 8. And, strictly speaking, it should not be necessary for Datadog profiler as well because we are attaching on startup so there won't be that many classes to process, anyway.

We have a reported crash on aarch64 where this workaround is one of the suspects. By removing it we can proceed on eliminating the suspects and home in on the real culprit.

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.

Unsure? Have a question? Request a review!

Copy link

🔧 Report generated by pr-comment-scanbuild

Scan-Build Report

User:runner@fv-az1543-749
Working Directory:/home/runner/work/java-profiler/java-profiler/ddprof-lib/src/test/make
Command Line:make -j4 clean all
Clang Version:Ubuntu clang version 14.0.0-1ubuntu1.1
Date:Thu Oct 31 16:27:09 2024

Bug Summary

Bug TypeQuantityDisplay?
All Bugs5
Logic error
Assigned value is garbage or undefined1
Dereference of null pointer3
Unused code
Dead nested assignment1

Reports

Bug Group Bug Type ▾ File Function/Method Line Path Length
Logic errorAssigned value is garbage or undefineddwarf.cppparseInstructions24420
Unused codeDead nested assignmentvmStructs.cppcheckNativeBinding8791
Logic errorDereference of null pointersafeAccess.hload3318
Logic errorDereference of null pointersymbols_linux.hElfParser12932
Logic errorDereference of null pointerflightRecorder.cppflush15048

Copy link

🔧 Report generated by pr-comment-cppcheck

CppCheck Report

Warnings (6)

Style Violations (167)

@jbachorik jbachorik merged commit 98b0e28 into main Oct 31, 2024
31 checks passed
@jbachorik jbachorik deleted the jb/jmethodid_rhapsody branch October 31, 2024 17:08
@github-actions github-actions bot added this to the 1.16.0 milestone Oct 31, 2024
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