-
Notifications
You must be signed in to change notification settings - Fork 165
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(libsinsp/state): ensure deep copy semantics and proper memory ownership in dynamic structs #2026
Conversation
…ership in dynamic structs Signed-off-by: Jason Dellaluce <jasondellaluce@gmail.com>
Perf diff from master - unit tests
Heap diff from master - unit tests
Heap diff from master - scap file
Benchmarks diff from master
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2026 +/- ##
==========================================
+ Coverage 74.20% 74.26% +0.05%
==========================================
Files 253 253
Lines 30832 30903 +71
Branches 5394 5414 +20
==========================================
+ Hits 22880 22949 +69
- Misses 7934 7949 +15
+ Partials 18 5 -13
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
/milestone 0.18.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/approve
LGTM label has been added. Git tree hash: d8532ed2b1c8a0bbcb74a4636189aef8eba910fc
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Andreagit97, FedeDP, jasondellaluce The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What type of PR is this?
/kind bug
Any specific area of the project related to this PR?
/area libsinsp
/area tests
Does this PR require a change in the driver versions?
What this PR does / why we need it:
With some random tests I figured that dynamic structs implemented shallow copy semantics, whereas the intended behavior was deep copy of the allocated values. For example, storing a dynamic field in the file descriptor subtable would end up having lost information when cloning file descriptor infos during the parsing phase of fork-family syscalls.
Tests have been added.
Which issue(s) this PR fixes:
Special notes for your reviewer:
Does this PR introduce a user-facing change?: