Description
Hi,
I get a crash in CentOS but same application code works perfectly in Windows 7.
I compiled the aws-cpp-sdk-core and aws-cpp-sdk-s3 in CentOS 6.5 GCC 4.9.2 and cmake 3.8.1
cmake -DCMAKE_BUILD_TYPE=Debug /AWSLIB/aws-sdk-cpp -DBUILD_ONLY="s3" -DCUSTOM_MEMORY_MANAGEMENT=1 -DTARGET_ARCH=LINUX
I read the README several times and made sure that the calling code has the AWS_CUSTOM_MEMORY_MANAGEMEN=1 during compile.
I made sure I call Aws::Utils::Memory::InitializeAWSMemorySystem at the start of the program
In the below code I get a NULL HttpResponse
ClientConfiguration clientConfiguration;
std::shared_ptr<HttpClient> MyHttpClient = CreateHttpClient(clientConfiguration);
std::shared_ptr<HttpRequest> req(
CreateHttpRequest(uri,
HttpMethod::HTTP_GET,
Utils::Stream::DefaultResponseStreamFactoryMethod));
std::shared_ptr<HttpResponse> res = MyHttpClient->MakeRequest(*req);
if (res == NULL)
{
std::cout << "Get:Response is NULL" << std::endl;
return hr;
}
And the program crashes when I return after doing cout.
The call stack is below.
Could you please help me find what is going wrong.
#0 0x00000037a9632925 in raise () from /lib64/libc.so.6
#1 0x00000037a9634105 in abort () from /lib64/libc.so.6
#2 0x00000037a9670837 in __libc_message () from /lib64/libc.so.6
#3 0x00000037a9676166 in malloc_printerr () from /lib64/libc.so.6
#4 0x00007fffba9265c2 in XXXDDMemoryAllocator::FreeMemory (this=0xdad390, memoryPtr=0x7fffba7110e0)
at /home/xxx/xxxyyyyyyyy/XXXLLLLLLLLLLLL/XXXOOOOOOO/src/XXXDDMemoryAllocator.cpp:43
#5 0x00007fffba4231cb in Aws::Free (memoryPtr=0x7fffba7110e0) at /zzzzzzzz/aws-sdk-cpp/aws-cpp-sdk-core/source/utils/memory/AWSMemory.cpp:102
#6 0x00007fffba71b1b0 in Aws::Allocator::deallocate (this=0x7fff9fffe207, p=0x7fffba7110e0 "", n=25)
at /home/xxx/xxxyyyyyyyy/./XXXLLLLLLLLLLLL/MMMMMMMM/aws/core/utils/memory/stl/AWSAllocator.h:74
#7 0x00007fffba71ad21 in std::basic_string<char, std::char_traits, Aws::Allocator >::_Rep::_M_destroy (this=0x7fffba7110e0, __a=...)
at /opt/rh/devtoolset-3/root/usr/include/c++/4.9.2/bits/basic_string.tcc:449
#8 0x00007fffba71a69c in std::basic_string<char, std::char_traits, Aws::Allocator >::_Rep::_M_dispose (this=0x7fffba7110e0, __a=...)
at /opt/rh/devtoolset-3/root/usr/include/c++/4.9.2/bits/basic_string.h:249
#9 0x00007fffba719f53 in std::basic_string<char, std::char_traits, Aws::Allocator >::~basic_string (this=0x7fff9fffe368, __in_chrg=)
at /opt/rh/devtoolset-3/root/usr/include/c++/4.9.2/bits/basic_string.h:547
#10 0x00007fffba719b9e in Aws::Client::ClientConfiguration::~ClientConfiguration (this=0x7fff9fffe2e0, __in_chrg=)
at /home/xxx/xxxyyyyyyyy/./XXXLLLLLLLLLLLL/MMMMMMMM/aws/core/client/ClientConfiguration.h:48