Skip to content
Commit a5eb3cb7 authored by Alexey Samsonov's avatar Alexey Samsonov
Browse files

[ASan] Fix an error on invalid deallocation in ASan allocator. When ASan...

[ASan] Fix an error on invalid deallocation in ASan allocator. When ASan checks if memory freed by user was indeed previously allocated, it first does an atomic write to presumed location of chunk header. This is wrong, as if the free is invalid, we may overwrite some valuable data (like other fields of the chunk header). Fix this by using atomic_compare_exchange instead.

llvm-svn: 177710
parent a7e42b5b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment