Michael Ho has posted comments on this change. ( http://gerrit.cloudera.org:8080/9601 )
Change subject: KUDU-2305: Limit sidecars to INT_MAX and fortify socket code ...................................................................... Patch Set 2: (1 comment) http://gerrit.cloudera.org:8080/#/c/9601/2/src/kudu/rpc/outbound_call.cc File src/kudu/rpc/outbound_call.cc: http://gerrit.cloudera.org:8080/#/c/9601/2/src/kudu/rpc/outbound_call.cc@161 PS2, Line 161: // SerializeMessage() takes the additional_size as an int32_t. Protect against : // any overflow. : CHECK_LE(sidecar_byte_size_, std::numeric_limits<int32_t>::max()); > Maybe these should be DCHECKs. We know that they can't be triggered, becaus I still find the type mismatch a bit confusing. Given the computation of total size in SerializeMessage() is using int64_t and sidecar_byte_size_ is also int64_t, I don't see why we just standardize on just switching the type of additional_size to int64_t and skip the cast inside SerialzieMessage() ? What's the benefit of keeping it as int32_t given 64-bit machines have 64-bit registers anyway. -- To view, visit http://gerrit.cloudera.org:8080/9601 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I2d041e214b15d9c22b810588643798e2b3bc5c24 Gerrit-Change-Number: 9601 Gerrit-PatchSet: 2 Gerrit-Owner: Joe McDonnell <joemcdonn...@cloudera.com> Gerrit-Reviewer: Joe McDonnell <joemcdonn...@cloudera.com> Gerrit-Reviewer: Kudu Jenkins Gerrit-Reviewer: Michael Ho <k...@cloudera.com> Gerrit-Reviewer: Todd Lipcon <t...@apache.org> Gerrit-Comment-Date: Wed, 14 Mar 2018 20:22:00 +0000 Gerrit-HasComments: Yes