Commit 19300f85 authored by Dmitry Vyukov's avatar Dmitry Vyukov
Browse files

tsan: fix munmap interceptor

MetaMap::ResetRange/FreeRange rounds the range up to at least kMetaShadowSize.
This is requried for e.g. free(malloc(0)). However, munmap returns EINVAL
and do not unmap any memory when length arguments is equal to 0.
So don't free meta shadow in this case as well.

llvm-svn: 234145
parent 2000211f
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment