Todd Lipcon has submitted this change and it was merged. ( 
http://gerrit.cloudera.org:8080/9132 )

Change subject: client: fix UBSAN error in failover calculation
......................................................................

client: fix UBSAN error in failover calculation

A misplaced typecast caused the following:

/data/somelongdirectorytoavoidrpathissues/src/kudu/src/kudu/client/scanner-internal.cc:433:72:
runtime error: unsigned integer overflow: 4 - 5 cannot be represented in type 
'unsigned long'

This patch simply rearranges the expression a bit to avoid underflow
possibilities.

Change-Id: Icd137f86443bc4af59f8a4290a45151afda6c090
Reviewed-on: http://gerrit.cloudera.org:8080/9132
Tested-by: Kudu Jenkins
Reviewed-by: Alexey Serbin <[email protected]>
Reviewed-by: Dan Burkert <[email protected]>
---
M src/kudu/client/scanner-internal.cc
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Kudu Jenkins: Verified
  Alexey Serbin: Looks good to me, approved
  Dan Burkert: Looks good to me, approved

--
To view, visit http://gerrit.cloudera.org:8080/9132
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Icd137f86443bc4af59f8a4290a45151afda6c090
Gerrit-Change-Number: 9132
Gerrit-PatchSet: 2
Gerrit-Owner: Todd Lipcon <[email protected]>
Gerrit-Reviewer: Alexey Serbin <[email protected]>
Gerrit-Reviewer: Dan Burkert <[email protected]>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <[email protected]>

Reply via email to