OSDN Git Service

Intialize memory to zero to silence MSan.
authorNicolas Capens <capn@google.com>
Fri, 7 Jul 2017 09:00:00 +0000 (05:00 -0400)
committerNicolas Capens <capn@google.com>
Fri, 7 Jul 2017 13:54:30 +0000 (13:54 +0000)
commit027288cc059bf507bc8bfb692344d6e6369c38ed
treeed4ce9c88c49fb19eea6e2df7c4c4b90d50a8aa8
parent96699f1a0ecf1e88b2dcab1bbd2bfac6a72fcf1d
Intialize memory to zero to silence MSan.

The MemorySanitizer tool can't instrument JIT-compiled code, so it's
unaware that the vertex processing routine writes the clip flags before
they're being read by triangle setup. This false positive can be
silenced by zeroing the memory at allocation. For good measure, zero
out all intermediate buffers.

Bug chromium:737875

Change-Id: Ic37ff5c64cb63bbddb151744af1d7dff0a254c2d
Reviewed-on: https://swiftshader-review.googlesource.com/10431
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
src/Common/Memory.cpp
src/Common/Memory.hpp
src/Common/Resource.cpp
src/Renderer/Surface.cpp