Skip to content

SIGSEGV when any S3CRT async request object gets destructed after queuing request #3510

@Climax777

Description

@Climax777

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThis issue is a bug.needs-triageThis issue or PR still needs to be triaged.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions