You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@impala.apache.org by "Sailesh Mukil (JIRA)" <ji...@apache.org> on 2017/10/31 05:45:00 UTC

[jira] [Created] (IMPALA-6132) ASAN test fails when trying to move/copy string created by kudu::EnvPosix::GetExecutablePath into InitAuth()

Sailesh Mukil created IMPALA-6132:
-------------------------------------

             Summary: ASAN test fails when trying to move/copy string created by kudu::EnvPosix::GetExecutablePath into InitAuth()
                 Key: IMPALA-6132
                 URL: https://issues.apache.org/jira/browse/IMPALA-6132
             Project: IMPALA
          Issue Type: Bug
          Components: Backend
            Reporter: Sailesh Mukil


Following from the code review: https://gerrit.cloudera.org/#/c/8412/

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.

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)

If anyone else is able to make progress on this, that would be great.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)