Hello Thomas Marshall, Joe McDonnell, Impala Public Jenkins,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/11976
to look at the new patch set (#3).
Change subject: IMPALA-7851: fix underflow in ReserveSpace()
......................................................................
IMPALA-7851: fix underflow in ReserveSpace()
The (num_rows - start_idx) calculation was incorrect because
num_rows is *not* inclusive of start_idx - it is the number
of rows after start_idx to add to the output patch rather than
one past the last row to add to the back.
(run_rows - start_idx) could then be negative, which results in
an underflow when it is implicitly converted to uint32_t.
The underflow could result in reserving huge amounts of memory in the
vector, which resulted in various misbehaviour such as hangs.
Testing:
Looped the test under ASAN. Before the fix it hung reliably. After it
succeeds quickly.
Change-Id: Iaec944f2149a6b9b605a5a885357fd54754dc046
---
M be/src/service/hs2-util.cc
1 file changed, 15 insertions(+), 13 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/76/11976/3
--
To view, visit http://gerrit.cloudera.org:8080/11976
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Iaec944f2149a6b9b605a5a885357fd54754dc046
Gerrit-Change-Number: 11976
Gerrit-PatchSet: 3
Gerrit-Owner: Tim Armstrong <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Joe McDonnell <[email protected]>
Gerrit-Reviewer: Thomas Marshall <[email protected]>