_CrtIsValidHeapPointer(block) assert in curl CleanupThread #5579
Labels
Azure.Core
Client
This issue points to a problem in the data-plane of the library.
customer-reported
Issues that are reported by GitHub users external to the Azure organization.
needs-team-attention
This issue needs attention from Azure service team or SDK team
question
The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Milestone
Describe the bug
We are getting a
_CrtIsValidHeapPointer(block)
assertion when using the SDK with curl on windows.The issue only occurs when the
CleanupThread
function is executed.At first we thought the issue was due to the library not using our custom memory allocators so we fixed that by setting them at the beginning of the program.
Looking at the Stack Trace, it seems that the free is not using our custom free though. We're not sure why that is happening.
Curl is definitely using our custom alloc and free functions during the executions before the cleanup.
We have also noticed that the SDK statically initializes curl which could lead to a deadlock on windows according to the documentation of
curl_global_init
.Exception or Stack Trace
To Reproduce
We build the SDK with vcpkg, we have tried linking curl statically and dynamically into the SDK, both are giving us this problem.
We employ an in house memory allocation solution.
As a workaround we are currently using the SDK with WinHTTP, which works fine.
Code Snippet
Expected behavior
We expect it to work without throwing an exception.
Screenshots
N/A
Setup (please complete the following information):
Additional context
Logging output
Information Checklist
Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report
The text was updated successfully, but these errors were encountered: