summaryrefslogtreecommitdiffstats
path: root/src/quarantine.c
Commit message (Collapse)AuthorAgeFilesLines
* Add quarantine unit tests.Jason Evans2013-12-171-2/+11
| | | | | | | | | Verify that freed regions are quarantined, and that redzone corruption is detected. Introduce a testing idiom for intercepting/replacing internal functions. In this case the replaced function is ordinarily a static function, but the idiom should work similarly for library-private functions.
* Fix two quarantine bugs.Jason Evans2013-01-311-10/+19
| | | | | | | Internal reallocation of the quarantined object array leaked the old array. Reallocation failure for internal reallocation of the quarantined object array (very unlikely) resulted in memory corruption.
* Fix potential TLS-related memory corruption.Jason Evans2013-01-311-42/+13
| | | | | | | | | | Avoid writing to uninitialized TLS as a side effect of deallocation. Initializing TLS during deallocation is unsafe because it is possible that a thread never did any allocation, and that TLS has already been deallocated by the threads library, resulting in write-after-free corruption. These fixes affect prof_tdata and quarantine; all other uses of TLS are already safe, whether intentionally (as for tcache) or unintentionally (as for arenas).
* Fix quarantine_grow() bugs.Jason Evans2012-04-241-9/+8
|
* Add usize sanity checking to quarantine.Jason Evans2012-04-241-13/+21
|
* Handle quarantine resurrection during thread exit.Jason Evans2012-04-241-5/+45
| | | | | Handle quarantine resurrection during thread exit in much the same way as tcache resurrection is handled.
* Clean up a few config-related conditionals/asserts.Jason Evans2012-04-181-2/+2
| | | | | | Clean up a few config-related conditionals to avoid unnecessary dependencies on prof symbols. Use cassert() rather than assert() everywhere that it's appropriate.
* Implement Valgrind support, redzones, and quarantine.Jason Evans2012-04-111-0/+163
Implement Valgrind support, as well as the redzone and quarantine features, which help Valgrind detect memory errors. Redzones are only implemented for small objects because the changes necessary to support redzones around large and huge objects are complicated by in-place reallocation, to the point that it isn't clear that the maintenance burden is worth the incremental improvement to Valgrind support. Merge arena_salloc() and arena_salloc_demote(). Refactor i[v]salloc() to expose the 'demote' option.