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

drop antiquated memory protection magic #136

Merged
merged 2 commits into from
Feb 8, 2024
Merged

Conversation

garlick
Copy link
Member

@garlick garlick commented Feb 8, 2024

Problem: The code is peppered with magic assertions and also includes a leak detector.

Valgrind should be finding these problems now.

Drop in-situ memory checks.

Copy link
Member

@chu11 chu11 left a comment

Choose a reason for hiding this comment

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

lgtm, just the commit message typo

@@ -22,8 +22,6 @@

#include "list.h"
#include "error.h"
#include "debug.h"
Copy link
Member

Choose a reason for hiding this comment

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

commit message typo "actually"

Problem: the powerman source code includes "magic cookie checks"
in many of its classes, and the xmalloc() wrapper actually tracks
the total number of bytes allocated and freed, but we have tools
for this sort of thing nowadays so these checks are extra.

Get rid of memory checks.
Problem: the debug.c stuff is only used by powerman but it
appears in libcommon.

Move it into the powerman directory.
@garlick
Copy link
Member Author

garlick commented Feb 8, 2024

Thanks, fixed that and I'll set MWP.

@mergify mergify bot merged commit 79257db into chaos:master Feb 8, 2024
8 checks passed
@garlick garlick deleted the nomagic branch February 8, 2024 22:45
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.

2 participants