Issue 73 in memory-sanitizer: MsanReallocate does not handle origins correctly

1 view
Skip to first unread message

memory-s...@googlecode.com

unread,
Nov 21, 2014, 7:04:45 AM11/21/14
to memory-s...@googlegroups.com
Status: Accepted
Owner: euge...@google.com
Labels: Type-Defect Priority-Medium

New issue 73 by euge...@google.com: MsanReallocate does not handle origins
correctly
https://code.google.com/p/memory-sanitizer/issues/detail?id=73

There is a number of issues in how MsanReallocate handles origins:
1. In the in-place grow case __msan_poison is used w/o setting origin for
the new memory at all
2. In the copy-realloc case __msan_memcpy is used. __msan_memcpy unwinds
stack, which only works correctly when called from the user code entry
point. All __msan_memcpy calls from msan runtime code are bugs and must be
replaced with CopyShadow.


--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

memory-s...@googlecode.com

unread,
Nov 21, 2014, 2:22:16 PM11/21/14
to memory-s...@googlegroups.com

Comment #1 on issue 73 by konstant...@gmail.com: MsanReallocate does not
>> In the in-place grow
Maybe we should just remove the "in-place grow" path and always do
copy-realloc, like in asan?

memory-s...@googlecode.com

unread,
Nov 24, 2014, 7:00:23 AM11/24/14
to memory-s...@googlegroups.com

Comment #2 on issue 73 by euge...@google.com: MsanReallocate does not
Why? It looks like very little extra complexity for unknown performance
benefit (but surely not negative).

memory-s...@googlecode.com

unread,
Jan 21, 2015, 11:52:35 AM1/21/15
to memory-s...@googlegroups.com
Updates:
Status: Fixed

Comment #3 on issue 73 by euge...@google.com: MsanReallocate does not
Fixed in http://llvm.org/viewvc/llvm-project?view=revision&revision=226674
Reply all
Reply to author
Forward
0 new messages