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

[v1.x] slabinfo: detect circular freelists #117

Merged
merged 1 commit into from
Oct 15, 2024

Conversation

brenns10
Copy link
Member

We use a set to track the freelist, but we don't actually use it to check whether we've seen the object in the freelist. If an object gets double freed, we'll enter into an infinite loop.

Check this and raise an error. Since we're already detecting invalid freelist pointers as one kind of error, let's add an exception class hierarchy to represent freelist errors, and then we can put this into the slabinfo directly. Then, we can format the information in a table at the end of the slabinfo.

Orabug: 37170864
Main branch: #110

We use a set to track the freelist, but we don't actually use it to
check whether we've seen the object in the freelist. If an object gets
double freed, we'll enter into an infinite loop.

Check this and raise an error. Since we're already detecting invalid
freelist pointers as one kind of error, let's add an exception class
hierarchy to represent freelist errors, and then we can put this into
the slabinfo directly. Then, we can format the information in a table at
the end of the slabinfo.

Orabug: 37170864
Signed-off-by: Stephen Brennan <[email protected]>
@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Oct 14, 2024
@brenns10 brenns10 merged commit bf39ab8 into oracle-samples:stable/v1 Oct 15, 2024
5 checks passed
@brenns10 brenns10 deleted the v1/circular-freelist branch October 15, 2024 23:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OCA Verified All contributors have signed the Oracle Contributor Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants