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

Tlsf memory corruption detection #77

Merged
merged 10 commits into from
Oct 18, 2017
Merged

Conversation

smits
Copy link
Member

@smits smits commented Nov 25, 2014

Reopening PR #63

Ruben Smits added 8 commits September 5, 2014 12:54
Applied commit from https://github.com/ndantam/tlsfmalloc:

From 2d7a980b887e8a33754a7660f41ea5ebf7d5c88a Mon Sep 17 00:00:00 2001
From: "Neil T. Dantam" <ntd@gatech.edu>
Date: Wed, 13 Nov 2013 00:41:15 -0500
Subject: [PATCH] Use the low bits of bhdr_t.prev_hdr to check for errors

* The low bits of prev_hdr field should contain the complement of the
  low bits of the size field.
* When this is not the case, it indicates heap corruption or a
  programming error
* Alternatively, or additionally, we could use parity bits for error
  checking
Applied commit from https://github.com/ndantam/tlsfmalloc:

From eadf5d0bfd247b43833a6042ca3ecac4f9d2cdeb Mon Sep 17 00:00:00 2001
From: "Neil T. Dantam" <ntd@gatech.edu>
Date: Tue, 19 Nov 2013 19:07:52 -0500
Subject: [PATCH] Cast pointers via union on GCC
Signed-off-by: Ruben Smits <ruben.smits@intermodalics.eu>
solves compilation errors with gcc-4.8 and XCode 5.1

Signed-off-by: Ruben Smits <ruben.smits@intermodalics.eu>
This reverts commit e2327e0. This commit prevents the use of multiple memory pools, (only accessible through the free/malloc_ex).
… to avoid corrupting previously allocated memory

Signed-off-by: Ruben Smits <ruben.smits@intermodalics.eu>
Signed-off-by: Ruben Smits <ruben.smits@intermodalics.eu>
* is more readable
* is correct on Mac OSX 10.8 using clang/XCode 5.1

Signed-off-by: Ruben Smits <ruben.smits@intermodalics.eu>
@snrkiwi
Copy link
Contributor

snrkiwi commented Sep 14, 2015

Any reason that this hasn't been merged? We've been using this for months on operational systems ...

@smits
Copy link
Member Author

smits commented Sep 14, 2015

The only reason is that ATM it aborts your application, it's uncertain yet if this is really what everyone wants.

@snrkiwi
Copy link
Contributor

snrkiwi commented Sep 14, 2015

Ok, so who makes the decision to merge it or not? Let's either merge, change it, or discard it, rather than leaving it hanging.

@meyerj meyerj added this to the 2.9 milestone Oct 27, 2015
@meyerj
Copy link
Member

meyerj commented Dec 21, 2015

merged into toolchain-2.9: 87220dc

@meyerj meyerj merged commit c2e08cf into master Oct 18, 2017
@meyerj meyerj deleted the tlsf_memory_corruption_detection branch October 18, 2017 18:51
meyerj added a commit to meyerj/rtt that referenced this pull request Oct 20, 2017
…ory_corruption_detection

Tlsf memory corruption detection
meyerj added a commit to meyerj/rtt that referenced this pull request Oct 23, 2017
…ory_corruption_detection

Tlsf memory corruption detection
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants