Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WinHTTP memory leak during failed requests #4490

Closed
RickWinter opened this issue Mar 29, 2023 · 0 comments · Fixed by #4530
Closed

WinHTTP memory leak during failed requests #4490

RickWinter opened this issue Mar 29, 2023 · 0 comments · Fixed by #4530
Assignees
Labels
Azure.Core bug This issue requires a change to an existing behavior in the product in order to be resolved. Client This issue points to a problem in the data-plane of the library.

Comments

@RickWinter
Copy link
Member

Repro code

// Copyright (c) Microsoft Corporation. All rights reserved.
// SPDX-License-Identifier: MIT

#include <iostream>
#include <stdexcept>

#include <azure/core/http/curl_transport.hpp>
#include <azure/storage/blobs.hpp>

int main()
{
  using namespace Azure::Storage::Blobs;

  std::string connectionStrign
      = "DefaultEndpointsProtocol=https;AccountName=nonexistingaccount;AccountKey="
        "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==;"
        "EndpointSuffix=core.windows.net";

  BlobClientOptions clientOptions;
  // clientOptions.Transport.Transport = std::make_shared<Azure::Core::Http::CurlTransport>();
  auto containerClient = Azure::Storage::Blobs::BlobContainerClient::CreateFromConnectionString(
      connectionStrign, "containername", clientOptions);

  while (true)
  {
    try
    {
      containerClient.CreateIfNotExists();
    }
    catch (std::exception& e)
    {
      std::cout << e.what() << std::endl;
    }
  }

  return 0;
}
@RickWinter RickWinter added bug This issue requires a change to an existing behavior in the product in order to be resolved. Azure.Core Client This issue points to a problem in the data-plane of the library. labels Mar 29, 2023
azure-sdk added a commit to azure-sdk/vcpkg that referenced this issue Apr 24, 2023
## 1.8.2 (2023-04-24)

### Bugs Fixed

- [[microsoft#4490]](Azure/azure-sdk-for-cpp#4490) Fixed WinHTTP memory leak during failed requests.
BillyONeal pushed a commit to microsoft/vcpkg that referenced this issue Apr 24, 2023
## 1.8.2 (2023-04-24)

### Bugs Fixed

- [[#4490]](Azure/azure-sdk-for-cpp#4490) Fixed WinHTTP memory leak during failed requests.
@github-actions github-actions bot locked and limited conversation to collaborators Jul 6, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Azure.Core bug This issue requires a change to an existing behavior in the product in order to be resolved. Client This issue points to a problem in the data-plane of the library.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants