https://github.com/Microsoft/CNTK
Revision dc65c2b57d857694256f32d962f58d79b4813da1 authored by Namgoo Lee on 31 July 2018, 00:45:32 UTC, committed by Namgoo Lee on 31 July 2018, 01:03:17 UTC
Valgrind sometimes reports "Source and destination overlap in memcpy" on
the overloaded = operator of SmallVector class. Whenever it is reported,
the src address and the dest address of memcpy is actually identical.

The solution in this commit is to check the src and dest address first,
and do memcpy only if they are not identical. This should be enough to
handle the issue, since the only case they overlap is when they are
identical, provided that the m_data is a member of a class.
1 parent 3d753db
Raw File
Tip revision: dc65c2b57d857694256f32d962f58d79b4813da1 authored by Namgoo Lee on 31 July 2018, 00:45:32 UTC
Fix overlapping memcpy reported by valgrind in SmallVector
Tip revision: dc65c2b
.gitmodules
[submodule "Source/Multiverso"]
	path = Source/Multiverso
	url = https://github.com/Microsoft/Multiverso
[submodule "external/gsl"]
	path = external/gsl
	url = https://github.com/Microsoft/GSL.git
	branch = d846fe5
[submodule "Source/CNTKv2LibraryDll/proto/onnx/onnx_repo"]
	path = Source/CNTKv2LibraryDll/proto/onnx/onnx_repo
	url = https://github.com/onnx/onnx.git
back to top