You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@arrow.apache.org by "Chiyang Wan (Jira)" <ji...@apache.org> on 2020/11/19 05:16:00 UTC

[jira] [Created] (ARROW-10651) [C++] alloc-dealloc-mismatch in s3fs.cc

Chiyang Wan created ARROW-10651:
-----------------------------------

             Summary: [C++] alloc-dealloc-mismatch in s3fs.cc
                 Key: ARROW-10651
                 URL: https://issues.apache.org/jira/browse/ARROW-10651
             Project: Apache Arrow
          Issue Type: Improvement
          Components: C++
    Affects Versions: 3.0.0
         Environment: Compile with clang memory sanitizer
            Reporter: Chiyang Wan


Checking

[https://github.com/apache/arrow/blob/256d0dc3f712154100aa6e0a610383b189008a83/cpp/src/arrow/filesystem/s3fs.cc#L611]
{quote}Aws::IOStreamFactory AwsWriteableStreamFactory(void* data, int64_t nbytes) {
  return [=]() \{ return new StringViewStream(data, nbytes); };
}
{quote}
Instead, there is supposed to be using `Aws::New` rather than c++'s own `new`.
{quote}Aws::IOStreamFactory AwsWriteableStreamFactory(void* data, int64_t nbytes) {
  return [=]() \{ return Aws::New<StringViewStream>("", data, nbytes); };
}
{quote}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)