HomePhabricator

[tsan] Fix size reporting for OS X zone allocator with 0-sized allocations

Description

[tsan] Fix size reporting for OS X zone allocator with 0-sized allocations

The custom zone implementation for OS X must not return 0 (even for 0-sized allocations). Returning 0 indicates that the pointer doesn't belong to the zone. This can break existing applications. The underlaying allocator allocates 1 byte for 0-sized allocations anyway, so returning 1 in this case is okay.

Differential Revision: http://reviews.llvm.org/D19100

Details

Committed
kuba.breckaApr 14 2016, 2:05 AM
Differential Revision
D19100: [tsan] Fix size reporting for OS X zone allocator with 0-sized allocations
Branches
Unknown
Tags
Unknown