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 a pair of slow memory leaks #83

Merged
merged 2 commits into from
Apr 9, 2024
Merged

Fix a pair of slow memory leaks #83

merged 2 commits into from
Apr 9, 2024

Conversation

jbachorik
Copy link
Collaborator

@jbachorik jbachorik commented Apr 9, 2024

What does this PR do?:
It fixes slow memory leaks as identified by the native heap profiler.

How to test the change?:
A new C++ unit test was added to make sure the thread info data are cleaned up properly - this required some refactoring but the code is now cleaner and is using C++ automatic memory management.

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: SCP-414

Unsure? Have a question? Request a review!

Copy link

github-actions bot commented Apr 9, 2024

🔧 Report generated by pr-comment-cppcheck

CppCheck Report

Warnings (5)

Style Violations (162)

@jbachorik jbachorik force-pushed the jb/memleaks branch 2 times, most recently from c7a9781 to b73e0bd Compare April 9, 2024 10:56
Copy link

github-actions bot commented Apr 9, 2024

🔧 Report generated by pr-comment-scanbuild

Scan-Build Report

User:runner@fv-az740-379
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:Tue Apr 9 11:21:54 2024

Bug Summary

Bug TypeQuantityDisplay?
All Bugs6
Logic error
Assigned value is garbage or undefined1
Dereference of null pointer2
Result of operation is garbage or undefined1
Unused code
Dead initialization1
Dead nested assignment1

Reports

Bug Group Bug Type ▾ File Function/Method Line Path Length
Logic errorAssigned value is garbage or undefineddwarf.cppparseInstructions23520
Unused codeDead initializationlivenessTracker.cppcleanup_table451
Unused codeDead nested assignmentvmStructs.cppcheckNativeBinding8181
Logic errorDereference of null pointerflightRecorder.cppflush14108
Logic errorDereference of null pointersafeAccess.hload3518
Logic errorResult of operation is garbage or undefineddwarf.hgetSLeb14225

@jbachorik jbachorik marked this pull request as ready for review April 9, 2024 11:30
@jbachorik jbachorik merged commit 0ddf730 into main Apr 9, 2024
27 checks passed
@jbachorik jbachorik deleted the jb/memleaks branch April 9, 2024 11:41
@github-actions github-actions bot added this to the 0.97.0 milestone Apr 9, 2024
@jbachorik jbachorik modified the milestones: 0.97.0, 1.4.0 Apr 10, 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