Sailesh Mukil has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/8412 )

Change subject: IMPALA-6126: ASAN detects heap-use-after-free in 
thrift-server-test
......................................................................


Patch Set 2:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/8412/2/be/src/rpc/thrift-server-test.cc
File be/src/rpc/thrift-server-test.cc:

http://gerrit.cloudera.org:8080/#/c/8412/2/be/src/rpc/thrift-server-test.cc@111
PS2, Line 111: string current_executable_path;
> Correct me if I'm wrong, but it seems like the root of the problem is that
After moving the string into InitAuth() and storing it in AuthManager (which is 
a global singleton), the ASAN error still kept showing up. I spent many hours 
trying to debug this problem and I have no understanding of why it happens. My 
inclination is that ASAN gets confused by how 
kudu::PosixEnv::GetExecutablePath() creates a string. It creates a 
unique_ptr<char[]> and then assign()'s it to a string.

I see no reason why your suggestion shouldn't work, but for some reason this is 
seen as a heap-use-after free if it is called multiple times.

The only thing that works for now is to leave the code as is in this patch set.

I have 2 attempts to move/copy the string into GetExecutablePath() and their 
corresponding errors here:
https://github.com/smukil/incubator-impala/commit/d3fedb0d665def4870b787a586e922e361cac2dc
 (copy)
https://github.com/smukil/incubator-impala/commit/c2e6ca8987054539be70e5ef7e3244c49df2ee40
 (move)

Opened IMPALA-6132 to track this.



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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2cd434757de2cd384def5b360a479e51812cccca
Gerrit-Change-Number: 8412
Gerrit-PatchSet: 2
Gerrit-Owner: Sailesh Mukil <sail...@cloudera.com>
Gerrit-Reviewer: Alex Behm <alex.b...@cloudera.com>
Gerrit-Reviewer: Lars Volker <l...@cloudera.com>
Gerrit-Reviewer: Sailesh Mukil <sail...@cloudera.com>
Gerrit-Comment-Date: Tue, 31 Oct 2017 05:46:47 +0000
Gerrit-HasComments: Yes

Reply via email to