[TSan][Darwin] Handle NULL argument in interceptor
authorJulian Lettner <julian.lettner@apple.com>
Mon, 24 Aug 2020 18:30:58 +0000 (11:30 -0700)
committerJulian Lettner <julian.lettner@apple.com>
Mon, 24 Aug 2020 18:36:02 +0000 (11:36 -0700)
commit2b7a2cbb15c461380bebed0fc8603a0ef16a8f5d
treed816b1362d63b580b99bf9e48c28ae5d1dea2689
parentb9496efbb9ebbf7ec76411fac4e12ff0dc7a8e06
[TSan][Darwin] Handle NULL argument in interceptor

Handle NULL address argument in the `mach_vm_[de]allocate()`
interceptors and fix test: `Assignment 2` is not valid if we weren't
able to re-allocate memory.

rdar://67680613
compiler-rt/lib/tsan/rtl/tsan_interceptors_mach_vm.cpp
compiler-rt/test/tsan/Darwin/mach_vm_allocate.c