Skip to content

Can't run example blob due to BlobContainerClient crashing in LogOptions set(const set& _Right) #5855

Open

Description

Describe the bug

Unhandled exception thrown: read access violation.
_Right_scary->_Myhead was 0x1.

Exception or Stack Trace

    template <_Strategy _Strat>
    void _Copy(const _Tree& _Right) { // copy or move entire tree from _Right
        const auto _Scary        = _Get_scary();
        const auto _Right_scary  = _Right._Get_scary();
        _Scary->_Myhead->_Parent = _Copy_nodes<_Strat>(_Right_scary->_Myhead->_Parent, _Scary->_Myhead); <---- exception here

Disassembly of the call to the copy above:
pvcl_test.exe!Azure::Core::Http::Policies::LogOptions::LogOptions(void):
00007FF6B3B0BBD0  mov         qword ptr [rsp+8],rcx  
00007FF6B3B0BBD5  push        rdi  
00007FF6B3B0BBD6  sub         rsp,30h  
00007FF6B3B0BBDA  mov         rax,qword ptr [this]  
00007FF6B3B0BBDF  mov         qword ptr [rsp+20h],rax  
00007FF6B3B0BBE4  mov         rdx,qword ptr [__imp_Azure::Core::Http::Policies::_detail::g_defaultAllowedHttpQueryParameters (07FF6B48F9448h)]  
00007FF6B3B0BBEB  mov         rcx,qword ptr [rsp+20h]  
00007FF6B3B0BBF0  call        std::set<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >::set<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > (07FF6B39AA80Dh)  



Executing this call from the example:
auto containerClient = BlobContainerClient::CreateFromConnectionString(GetConnectionString(), "sandbox");

azure_test.exe!std::_Tree<std::_Tset_traits<std::string,std::less<std::string>,std::allocator<std::string>,0>>::_Copy<0>(const std::_Tree<std::_Tset_traits<std::string,std::less<std::string>,std::allocator<std::string>,0>> & _Right) Line 1633	C++
 	azure_test.exe!std::_Tree<std::_Tset_traits<std::string,std::less<std::string>,std::allocator<std::string>,0>>::_Tree<std::_Tset_traits<std::string,std::less<std::string>,std::allocator<std::string>,0>><std::allocator<std::_Tree_node<std::string,void *>>>(const std::_Tree<std::_Tset_traits<std::string,std::less<std::string>,std::allocator<std::string>,0>> & _Right, std::allocator<std::_Tree_node<std::string,void *>> && _Al) Line 898	C++
 	azure_test.exe!std::set<std::string,std::less<std::string>,std::allocator<std::string>>::set<std::string,std::less<std::string>,std::allocator<std::string>>(const std::set<std::string,std::less<std::string>,std::allocator<std::string>> & _Right) Line 87	C++
 	azure_test.exe!Azure::Core::Http::Policies::LogOptions::LogOptions()	C++
 	azure_test.exe!Azure::Core::_internal::ClientOptions::ClientOptions() Line 56	C++
 	[External Code]	

To Reproduce
Build and run the example from here: https://github.com/Azure/azure-sdk-for-cpp or here: https://github.com/Azure/azure-sdk-for-cpp/blob/main/sdk/storage/azure-storage-blobs/samples/blob_getting_started.cpp

I tried this with both examples, both produce the same results. The LogOptions have some issue when the ClientOptions() = default; is called creating a BlobContainerClient

Code Snippet
auto containerClient = BlobContainerClient::CreateFromConnectionString(GetConnectionString(), "sandbox");

Expected behavior
Don't crash

Setup (please complete the following information):

  • OS: Windows
  • IDE : MSVC 2022
  • Revision: 576379156e82da642f8d1834220876759f13534d
    Author: Timur Chernykh 45117783+t43rr7@users.noreply.github.com
    Date: 7/5/2024 11:07:14 AM
    Message:
    [libcgroup] added new port (#39647)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

ClientThis issue points to a problem in the data-plane of the library.Service AttentionWorkflow: This issue is responsible by Azure service team.StorageStorage Service (Queues, Blobs, Files)customer-reportedIssues that are reported by GitHub users external to the Azure organization.needs-team-attentionWorkflow: This issue needs attention from Azure service team or SDK teamquestionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions