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(userspace/libsinsp): make sure all destructors are invoked #1528

Merged
merged 1 commit into from
Dec 1, 2023

Conversation

jasondellaluce
Copy link
Contributor

What type of PR is this?

/kind bug

/kind cleanup

Any specific area of the project related to this PR?

/area libsinsp

Does this PR require a change in the driver versions?

What this PR does / why we need it:

I noticed we have a bunch of classes inheriting from others that haven't defined their destructor as virtual. Not doing so makes it very unpredictable to know which destructor is actually invoked at object disposal time. In general this causes segfaults or memory leaks. Looking at the code, I don't think this can be the cause of any time-growing memory leak in Falco, but my bet is that this eats some extra bytes when loading rules when not necessary. For other clients of the libs, this can potentially cause subtle issues.

Which issue(s) this PR fixes:

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

NONE

Signed-off-by: Jason Dellaluce <jasondellaluce@gmail.com>
@jasondellaluce
Copy link
Contributor Author

/milestone 0.14.0

@poiana poiana added this to the 0.14.0 milestone Nov 30, 2023
@poiana poiana requested review from hbrueckner and mstemm November 30, 2023 17:57
Copy link
Contributor

@FedeDP FedeDP left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/approve

@poiana
Copy link
Contributor

poiana commented Nov 30, 2023

LGTM label has been added.

Git tree hash: c0927122a1f3d1a31eb2d337ff6e08e4dcf581de

Copy link
Member

@Andreagit97 Andreagit97 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/approve

@poiana
Copy link
Contributor

poiana commented Dec 1, 2023

[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:
  • OWNERS [Andreagit97,FedeDP,jasondellaluce]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@poiana poiana merged commit 6044d7b into master Dec 1, 2023
@poiana poiana deleted the fix/constructors-memleak branch December 1, 2023 13:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants