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)

Reply via email to