Skip to content

Commit

Permalink
EXPERIMENT: apacheGH-44071: [C++] Leak S3 structures if finalization …
Browse files Browse the repository at this point in the history
…happens too late
  • Loading branch information
pitrou committed Sep 13, 2024
1 parent a828bd2 commit 052e196
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cpp/src/arrow/filesystem/s3fs.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3389,6 +3389,9 @@ struct AwsInstance {
ARROW_LOG(WARNING)
<< " arrow::fs::FinalizeS3 was not called even though S3 was initialized. "
"This could lead to a segmentation fault at exit";
auto leaked_ptr = new std::shared_ptr<S3ClientFinalizer>(GetClientFinalizer());
ARROW_UNUSED(leaked_ptr);
return;
}
GetClientFinalizer()->Finalize();
#ifdef ARROW_S3_HAS_S3CLIENT_CONFIGURATION
Expand Down

0 comments on commit 052e196

Please sign in to comment.