Skip to content
Commit 844f5828 authored by Evgeniy Stepanov's avatar Evgeniy Stepanov
Browse files

[msan] Fix origins in realloc.

Fixes 2 issues in origins arising from realloc() calls:
 * In the in-place grow case origin for the new memory is not set at all.
 * In the copy-realloc case __msan_memcpy is used, which unwinds stack from
   inside the MSan runtime. This does not generally work (as we may be built
   w/o frame pointers), and produces "bad" stack trace anyway, with several
   uninteresting (internal) frames on top.

This change also makes realloc() honor "zeroise" and "poison_in_malloc" flags.

See https://code.google.com/p/memory-sanitizer/issues/detail?id=73.

llvm-svn: 226674
parent 84adb5d1
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment