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

Fix Java 24 support #194

Merged
merged 1 commit into from
Mar 18, 2025
Merged

Fix Java 24 support #194

merged 1 commit into from
Mar 18, 2025

Conversation

jbachorik
Copy link
Collaborator

What does this PR do?:
In Java 24 the version string is slightly different (to avoid confusion with Hotspot version from Java 7, which is also 24)

In addition to that, a change of vmstructs which was supposed to go to Java 25 made it to Java 24 and we need to adjust the code to avoid crashing.

Motivation:
We want to support Java 24

How to test the change?:
Extended gtest tests for the adjusted version string.
The reset is exercised using the current 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.

Unsure? Have a question? Request a review!

Copy link

🔧 Report generated by pr-comment-scanbuild

Scan-Build Report

User:runner@fv-az1979-486
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 18.1.3 (1ubuntu1)
Date:Tue Mar 18 19:31:26 2025

Bug Summary

Bug TypeQuantityDisplay?
All Bugs7
Logic error
Dereference of null pointer3
Suspicious operation
Bitwise shift1
Unused code
Dead initialization2
Dead nested assignment1

Reports

Bug Group Bug Type ▾ File Function/Method Line Path Length
Suspicious operationBitwise shiftvmStructs.cppfind90216
Unused codeDead initializationjavaApi.cppJava_com_datadoghq_profiler_JavaProfiler_getStatus01161
Unused codeDead initializationstackWalker.cppwalkDwarf1601
Unused codeDead nested assignmentvmStructs.cppcheckNativeBinding10071
Logic errorDereference of null pointersafeAccess.hload3318
Logic errorDereference of null pointersymbols_linux.hElfParser14428
Logic errorDereference of null pointerflightRecorder.cppflush15048

Copy link

🔧 Report generated by pr-comment-cppcheck

CppCheck Report

Warnings (7)

Style Violations (398)

@jbachorik jbachorik merged commit 0e5b5f9 into main Mar 18, 2025
94 of 95 checks passed
@github-actions github-actions bot added this to the 1.23.0 milestone Mar 18, 2025
@jbachorik jbachorik deleted the jb/version_24 branch March 18, 2025 23:54
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