-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Description
Describe the bug
Even a minimal example where PutObjectAsync is used, where the original request object gets destructed, now segfaults ever since a94edca.
Internally, it seems mostly that the original request is copied to outlive the request object, except for the storage of the original request. This has never been an issue until a94edca
Now the original request object has to be kept alive, and even the minimal example provided crashes: https://docs.aws.amazon.com/sdk-for-cpp/v1/developer-guide/async-methods.html with enough network latency (in other words, where it doesn't complete before the end of the return).
Regression Issue
- Select this option if this issue appears to be a regression.
Expected Behavior
Given the example code one would expect the request to copy the request object.
Current Behavior
The original request object has to be kept alive, since a pointer to it is stored and accessed asynchronously.
Reproduction Steps
Minimal example as provided breaks, given that the process doesn't succeed/fail before returning and destructing. Also seems that adding a std::cout << std::endl; aggravates it. Not sure if it somehow does some flushing.
Possible Solution
Instead of storing the & of the request, just copy it?
Additional Information/Context
No response
AWS CPP SDK version used
1.11.621
Compiler and Version used
gcc (Ubuntu 14.2.0-19ubuntu2) 14.2.0
Operating System and version
Ubuntu 25.04