Adar Dembo has submitted this change and it was merged.
Change subject: rpc: fix too-long memcmp for HTTP methods
......................................................................
rpc: fix too-long memcmp for HTTP methods
Previously we were using arraysize(kHTTPHeader) where kHTTPHeader is a
constant "HTTP". This array would then include the terminating null
byte, which is length 5 rather than the expected length 4.
This switches to using strlen instead of arraysize.
This fixes the following ASAN error seen occasionally in tests:
==5170==ERROR: AddressSanitizer: use-after-poison on address 0x7f571f7b886c at
pc 0x00000048b40c bp 0x7f571f7b8370 sp 0x7f571f7b7b20
READ of size 5 at 0x7f571f7b886c thread T85 (negotiator [wor)
#0 0x48b40b in memcmp
/data1/jenkins-workspace/kudu-workspace/thirdparty/src/llvm-3.9.0.src/projects/compiler-rt/lib/asan/../sanitizer_common/sanitizer_common_interceptors.inc:628
#1 0x7f574d3c126d in kudu::rpc::ReceiveFramedMessageBlocking(kudu::Socket*,
kudu::faststring*, google::protobuf::MessageLite*, kudu::Slice*, kudu::MonoTime
const&)
/data1/jenkins-workspace/kudu-workspace/src/kudu/rpc/blocking_ops.cc:103:9
Change-Id: Ic3f7be076bf0e1459d583876f65036e31034adcb
Reviewed-on: http://gerrit.cloudera.org:8080/4992
Tested-by: Kudu Jenkins
Reviewed-by: Adar Dembo <[email protected]>
---
M src/kudu/rpc/blocking_ops.cc
1 file changed, 2 insertions(+), 1 deletion(-)
Approvals:
Adar Dembo: Looks good to me, approved
Kudu Jenkins: Verified
--
To view, visit http://gerrit.cloudera.org:8080/4992
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ic3f7be076bf0e1459d583876f65036e31034adcb
Gerrit-PatchSet: 3
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Todd Lipcon <[email protected]>
Gerrit-Reviewer: Adar Dembo <[email protected]>
Gerrit-Reviewer: Dan Burkert <[email protected]>
Gerrit-Reviewer: Kudu Jenkins