-
Notifications
You must be signed in to change notification settings - Fork 2k
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
sys/net/gnrc_pktbuf_static: add double free detection #20974
sys/net/gnrc_pktbuf_static: add double free detection #20974
Conversation
9bd4954
to
9c6c2f3
Compare
9c6c2f3
to
3d1e6f5
Compare
3d1e6f5
to
982af61
Compare
Looks like the Murdock queue and the Github queue got out of sync. If the current Murdock build of this succeeds but this PR will not get merged due to the sync issue, I'll requeue it without compile-testing to not waste another 4 h. |
The Murdock run failed (probably bogus), but let's have a full run again. |
This did just pass the CI: https://ci.riot-os.org/details/0e58eacd8ce441bab5074592a9f1b431 Because of a timeout in the merge queue, it did not get merged. I'll requeue without compile test now and add it to the head of the queue, so that everything is as if it were merged after passing the CI. |
The PR that changes the README.md ended up getting queued first. So it is not exactly as if it this PR got merged right after the test. But I feel confident that a README.md change will not break builds. |
OK, now other stuff got merged as well. Let's have a full CI run again. |
Contribution description
The basic idea is: all free data is filled with
CANARY
bytes, once data is allocated this is overwritten with~CANARY
.When data is freed we now check if the chunk is only set to
CANARY
- if this happens, it was already freed.Testing procedure
Set
CONFIG_GNRC_PKTBUF_CHECK_USE_AFTER_FREE
to1
.Issues/PRs references