Skip to content
  • Alexey Samsonov's avatar
    Call __asan_free_hook() before marking the chunk quarantinned · 8f5138a2
    Alexey Samsonov authored
    Summary:
    With this change, the user may safely call __asan_get_ownership()
    from malloc/free hooks and assume it would return "true". If there is a
    realloc/free race, free hook might be called twice, but I think it's acceptable,
    as it's a data race and would later be reported anyway.
    
    This change also fixes a bug when failing realloc incorrectly marked the
    original memory as "quarantinned".
    
    Reviewers: timurrrr, kcc, samsonov
    
    Reviewed By: samsonov
    
    CC: llvm-commits
    
    Differential Revision: http://llvm-reviews.chandlerc.com/D913
    
    llvm-svn: 183220
    8f5138a2
Loading