folly/GroupVarint: fix a clang-caught heap-buffer-overrun
Summary:
Avoid a clang-caught heap-buffer-overrun
and document that the ssse3 decoder requires at least 17 bytes
of readable memory starting at the source pointer.
* folly/GroupVarint.h (decode_simple): Comment out dead code.
(decode)[__SSSE3__]: Add a comment describing this limitation.
* folly/test/GroupVarintTest.cpp (testGroupVarint32):
Include <algorithm> for use of std::max.
Ensure that the buffer we use has length at least 17.
Test Plan:
Now, all tests succeed with clang/asan
Reviewed By: simpkins@fb.com
Subscribers: trunkagent, mathieubaudet, njormrod
FB internal diff:
D1579109
Tasks:
5241437