Tim Armstrong has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/11118 )

Change subject: IMPALA-5031: Fix undefined behavior: ptr overflow
......................................................................


Patch Set 1:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/11118/1/be/src/runtime/mem-pool.cc
File be/src/runtime/mem-pool.cc:

http://gerrit.cloudera.org:8080/#/c/11118/1/be/src/runtime/mem-pool.cc@190
PS1, Line 190:   vector<ChunkInfo>::iterator insert_chunk = chunks_.begin() + 
(current_chunk_idx_ + 1);
I had to stare at this for a minute. Is the bug in the case when 
current_chunk_idx_ is -1?

I always found the current_chunk_idx_ logic here confusing...

The new code seems fine, might be worth dropping a comment to explain why the 
parens are significant.



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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I3d28a80763adb62572b3dd81ea732d18d957d248
Gerrit-Change-Number: 11118
Gerrit-PatchSet: 1
Gerrit-Owner: Jim Apple <jbapple-imp...@apache.org>
Gerrit-Reviewer: Impala Public Jenkins <impala-public-jenk...@cloudera.com>
Gerrit-Reviewer: Tim Armstrong <tarmstr...@cloudera.com>
Gerrit-Comment-Date: Fri, 03 Aug 2018 22:50:03 +0000
Gerrit-HasComments: Yes

Reply via email to