Skip to content

Commit

Permalink
EXPERIMENT: GH-44071: [C++] Leak S3 structures if finalization happen…
Browse files Browse the repository at this point in the history
…s too late
  • Loading branch information
pitrou committed Sep 12, 2024
1 parent 15158bd commit e7d9ea5
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 e7d9ea5

Please sign in to comment.