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

Segfault in release build #19

Closed
eugene345 opened this issue Sep 30, 2015 · 27 comments
Closed

Segfault in release build #19

eugene345 opened this issue Sep 30, 2015 · 27 comments

Comments

@eugene345
Copy link

Hello,

I'm on Ubuntu 15.04 now. I have a segmentation fault for release build only. Debug build works fine. The library was compiled with STATIC_LINKING=1. Compiler - GCC 4.9.2.

My code:

bool MainWindow::credentialsProviderTest()
{
    Aws::Utils::Logging::InitializeAWSLogging(Aws::MakeShared<Aws::Utils::Logging::DefaultLogSystem>(ALLOCATION_TAG, Aws::Utils::Logging::LogLevel::Trace, "aws_sdk_"));

    // Create a client
    ClientConfiguration config;
    config.scheme = Scheme::HTTPS;
    config.connectTimeoutMs = 30000;
    config.requestTimeoutMs = 30000;

    auto cognitoIdentityClient = Aws::MakeShared<CognitoIdentityClient>(ALLOCATION_TAG, Aws::MakeShared<SimpleAWSCredentialsProvider>(ALLOCATION_TAG, "", ""), config);
    auto cognitoCachingAnonymousCredentialsProvider = Aws::MakeUnique<CognitoCachingAnonymousCredentialsProvider>(ALLOCATION_TAG, accountId, identityPoolId, cognitoIdentityClient);
    AWSCredentials credentials = cognitoCachingAnonymousCredentialsProvider->GetAWSCredentials();
    credentials = cognitoCachingAnonymousCredentialsProvider->GetAWSCredentials();

    Aws::Utils::Logging::ShutdownAWSLogging();
    return true;
}

Stack trace:
image

runCognitoIntegrationTests shows same problem:

image

log

@JonathanHenson
Copy link
Contributor

I don't think the log is for this code: It makes a ListIdentityPools, and does so unsigned (which will fail).

Anyways, we had a bug a long time ago (on linux) where a string going out of scope in the curl client was causing a segfault in the makeRequest function. Any chance you could dig down into that? For starters what curl version are you using?

@eugene345
Copy link
Author

Sorry, yes, this log file is for runCognitoIntegrationTests. Logs for my code below:
release
debug

Curl version:
curl 7.38.0 (x86_64-pc-linux-gnu) libcurl/7.38.0 OpenSSL/1.0.1f zlib/1.2.8 libidn/1.28 librtmp/2.3

I have no idea, how to debug makeRequest, since release build hasn't symbolic debug information. Can you help me, please?

@JonathanHenson
Copy link
Contributor

Good point. I'll try and see if I can reproduce the problem today.
On Oct 1, 2015 2:10 AM, "eugene345" notifications@github.com wrote:

Sorry, yes, this log file is for runCognitoIntegrationTests. Logs for my
code below:
release
https://www.dropbox.com/s/ht5bazhjmgw29jj/aws_sdk_2015-10-01-10_release.txt?dl=0
debug
https://www.dropbox.com/s/j8wvvmm6spbktqc/aws_sdk_2015-09-30-23_debug.txt?dl=0

Curl version:
curl 7.38.0 (x86_64-pc-linux-gnu) libcurl/7.38.0 OpenSSL/1.0.1f zlib/1.2.8
libidn/1.28 librtmp/2.3

I have no idea, how to debug makeRequest, since release build hasn't
symbolic debug information. Can you help me, please?


Reply to this email directly or view it on GitHub
#19 (comment).

@JonathanHenson
Copy link
Contributor

This is definitely that old bug we had with curl. Can you run:

valgrind --tool=memcheck and upload the result?

@eugene345
Copy link
Author

valgrind --tool=memcheck

@JonathanHenson
Copy link
Contributor

ok, one more experiment (I haven't been able to replicate the issue yet). In Aws::Http::CurlHandleContainer() class
Aws::Auth::CognitoCachingCredentialsProvider::GetCredentials() methods
Aws::Client::AWSClient::AddContentBodyToRequest() method
Aws::Client::AWSClient::AttemptOneRequest() method
Aws::Http::CurlHttpClient::MakeRequest()

could you change the log statements to use the LOGSTREAM api, recompile and try again. That is the only suspicious thing I see in the valgrind output and I'm curious if something is overwriting memory somewhere and we just can't see it until release build time.

@eugene345
Copy link
Author

Can you explain, please, what is difference between these apis?

@JonathanHenson
Copy link
Contributor

Yeah, log uses sprintf under the hood with va_args and the other uses std c++ steams. I'm curious if something bad is happening under the hood with the va_args stuff and I'd like to rule that out.

@JonathanHenson
Copy link
Contributor

notice in AWSClient.cpp

AWS_LOGSTREAM_TRACE(LOG_TAG, "Error response is " << exceptionPayload.WriteReadable());

as opposed to
AWS_LOG_TRACE(LOG_TAG, "Error response is %s", exceptionPayload.WriteReadable().c_str());

@eugene345
Copy link
Author

can I just disable logging in my code to check it?

@JonathanHenson
Copy link
Contributor

ah! yes you can. Good call.

@eugene345
Copy link
Author

I've tried already, but the problem still exists.

@JonathanHenson
Copy link
Contributor

hmmmm..... With logging turned off, can I see your valgrind output? That may actually make the issue more obvious.

@eugene345
Copy link
Author

Logging turned off:

==23449== Memcheck, a memory error detector
==23449== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
==23449== Using Valgrind-3.10.1 and LibVEX; rerun with -h for copyright info
==23449== Command: /home/eugene/AWS/build-cognitoQt-Desktop_Qt_5_5_0_GCC_64bit-Release/cognitoQt
==23449== 
==23449== Conditional jump or move depends on uninitialised value(s)
==23449==    at 0x154E834A: ??? (in /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0.2400.27)
==23449==    by 0x8BFA503: ??? (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4400.1)
==23449==    by 0x8C13FA6: g_signal_emit_valist (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4400.1)
==23449==    by 0x8C14E49: g_signal_emit_by_name (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4400.1)
==23449==    by 0x8C01C2A: g_object_set_valist (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4400.1)
==23449==    by 0x8C024BB: g_object_set (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4400.1)
==23449==    by 0x56BFA35: ??? (in /home/eugene/Qt/5.5/gcc_64/lib/libQt5Widgets.so.5.5.0)
==23449==    by 0x564488C: QStyleFactory::create(QString const&) (in /home/eugene/Qt/5.5/gcc_64/lib/libQt5Widgets.so.5.5.0)
==23449==    by 0x55DE5F4: QApplication::style() (in /home/eugene/Qt/5.5/gcc_64/lib/libQt5Widgets.so.5.5.0)
==23449==    by 0x55DE884: QApplicationPrivate::initialize() (in /home/eugene/Qt/5.5/gcc_64/lib/libQt5Widgets.so.5.5.0)
==23449==    by 0x55DE8CE: QApplicationPrivate::construct() (in /home/eugene/Qt/5.5/gcc_64/lib/libQt5Widgets.so.5.5.0)
==23449==    by 0x40740A: main (in /home/eugene/AWS/build-cognitoQt-Desktop_Qt_5_5_0_GCC_64bit-Release/cognitoQt)
==23449== 
==23449== Conditional jump or move depends on uninitialised value(s)
==23449==    at 0x92BF1EB: g_utf8_offset_to_pointer (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4400.1)
==23449==    by 0x154EB934: ??? (in /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0.2400.27)
==23449==    by 0x154EBF4B: ??? (in /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0.2400.27)
==23449==    by 0x154EC278: ??? (in /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0.2400.27)
==23449==    by 0x8BFA2D4: g_closure_invoke (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4400.1)
==23449==    by 0x8C0B912: ??? (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4400.1)
==23449==    by 0x8C14697: g_signal_emit_valist (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4400.1)
==23449==    by 0x8C148FE: g_signal_emit (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4400.1)
==23449==    by 0x1567A913: gtk_widget_realize (in /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0.2400.27)
==23449==    by 0x1567BBF7: gtk_widget_set_parent (in /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0.2400.27)
==23449==    by 0x1551AD22: gtk_fixed_put (in /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0.2400.27)
==23449==    by 0x8BFD586: g_cclosure_marshal_VOID__OBJECTv (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4400.1)
==23449== 
==23449== Conditional jump or move depends on uninitialised value(s)
==23449==    at 0x92BF212: g_utf8_offset_to_pointer (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4400.1)
==23449==    by 0x154EB934: ??? (in /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0.2400.27)
==23449==    by 0x154EBF4B: ??? (in /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0.2400.27)
==23449==    by 0x154EC278: ??? (in /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0.2400.27)
==23449==    by 0x8BFA2D4: g_closure_invoke (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4400.1)
==23449==    by 0x8C0B912: ??? (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4400.1)
==23449==    by 0x8C14697: g_signal_emit_valist (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4400.1)
==23449==    by 0x8C148FE: g_signal_emit (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4400.1)
==23449==    by 0x1567A913: gtk_widget_realize (in /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0.2400.27)
==23449==    by 0x1567BBF7: gtk_widget_set_parent (in /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0.2400.27)
==23449==    by 0x1551AD22: gtk_fixed_put (in /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0.2400.27)
==23449==    by 0x8BFD586: g_cclosure_marshal_VOID__OBJECTv (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4400.1)
==23449== 
==23449== Invalid read of size 4
==23449==    at 0x465B23: Aws::Http::CurlHttpClient::MakeRequest(Aws::Http::HttpRequest&, Aws::Utils::RateLimits::RateLimiterInterface*, Aws::Utils::RateLimits::RateLimiterInterface*) const (in /home/eugene/AWS/build-cognitoQt-Desktop_Qt_5_5_0_GCC_64bit-Release/cognitoQt)
==23449==    by 0x4554EA: Aws::Client::AWSClient::AttemptOneRequest(std::string const&, Aws::AmazonWebServiceRequest const&, Aws::Http::HttpMethod) const (in /home/eugene/AWS/build-cognitoQt-Desktop_Qt_5_5_0_GCC_64bit-Release/cognitoQt)
==23449==    by 0x45586F: Aws::Client::AWSClient::AttemptExhaustively(std::string const&, Aws::AmazonWebServiceRequest const&, Aws::Http::HttpMethod) const (in /home/eugene/AWS/build-cognitoQt-Desktop_Qt_5_5_0_GCC_64bit-Release/cognitoQt)
==23449==    by 0x458A1E: Aws::Client::AWSJsonClient::MakeRequest(std::string const&, Aws::AmazonWebServiceRequest const&, Aws::Http::HttpMethod) const (in /home/eugene/AWS/build-cognitoQt-Desktop_Qt_5_5_0_GCC_64bit-Release/cognitoQt)
==23449==    by 0x484240: Aws::CognitoIdentity::CognitoIdentityClient::GetId(Aws::CognitoIdentity::Model::GetIdRequest const&) const (in /home/eugene/AWS/build-cognitoQt-Desktop_Qt_5_5_0_GCC_64bit-Release/cognitoQt)
==23449==    by 0x4A7C62: FetchCredentialsFromCognito(Aws::CognitoIdentity::CognitoIdentityClient const&, Aws::Auth::PersistentCognitoIdentityProvider&, char const*, bool) (in /home/eugene/AWS/build-cognitoQt-Desktop_Qt_5_5_0_GCC_64bit-Release/cognitoQt)
==23449==    by 0x4A8C18: Aws::Auth::CognitoCachingAnonymousCredentialsProvider::GetCredentialsFromCognito() const (in /home/eugene/AWS/build-cognitoQt-Desktop_Qt_5_5_0_GCC_64bit-Release/cognitoQt)
==23449==    by 0x4A6284: Aws::Auth::CognitoCachingCredentialsProvider::GetAWSCredentials() (in /home/eugene/AWS/build-cognitoQt-Desktop_Qt_5_5_0_GCC_64bit-Release/cognitoQt)
==23449==    by 0x40A325: MainWindow::credentialsProviderTest() (in /home/eugene/AWS/build-cognitoQt-Desktop_Qt_5_5_0_GCC_64bit-Release/cognitoQt)
==23449==    by 0x40AD6F: MainWindow::MainWindow(QWidget*) (in /home/eugene/AWS/build-cognitoQt-Desktop_Qt_5_5_0_GCC_64bit-Release/cognitoQt)
==23449==    by 0x407414: main (in /home/eugene/AWS/build-cognitoQt-Desktop_Qt_5_5_0_GCC_64bit-Release/cognitoQt)
==23449==  Address 0xfffffffffffffff8 is not stack'd, malloc'd or (recently) free'd
==23449== 
==23449== 
==23449== Process terminating with default action of signal 11 (SIGSEGV)
==23449==  Access not within mapped region at address 0xFFFFFFFFFFFFFFF8
==23449==    at 0x465B23: Aws::Http::CurlHttpClient::MakeRequest(Aws::Http::HttpRequest&, Aws::Utils::RateLimits::RateLimiterInterface*, Aws::Utils::RateLimits::RateLimiterInterface*) const (in /home/eugene/AWS/build-cognitoQt-Desktop_Qt_5_5_0_GCC_64bit-Release/cognitoQt)
==23449==    by 0x4554EA: Aws::Client::AWSClient::AttemptOneRequest(std::string const&, Aws::AmazonWebServiceRequest const&, Aws::Http::HttpMethod) const (in /home/eugene/AWS/build-cognitoQt-Desktop_Qt_5_5_0_GCC_64bit-Release/cognitoQt)
==23449==    by 0x45586F: Aws::Client::AWSClient::AttemptExhaustively(std::string const&, Aws::AmazonWebServiceRequest const&, Aws::Http::HttpMethod) const (in /home/eugene/AWS/build-cognitoQt-Desktop_Qt_5_5_0_GCC_64bit-Release/cognitoQt)
==23449==    by 0x458A1E: Aws::Client::AWSJsonClient::MakeRequest(std::string const&, Aws::AmazonWebServiceRequest const&, Aws::Http::HttpMethod) const (in /home/eugene/AWS/build-cognitoQt-Desktop_Qt_5_5_0_GCC_64bit-Release/cognitoQt)
==23449==    by 0x484240: Aws::CognitoIdentity::CognitoIdentityClient::GetId(Aws::CognitoIdentity::Model::GetIdRequest const&) const (in /home/eugene/AWS/build-cognitoQt-Desktop_Qt_5_5_0_GCC_64bit-Release/cognitoQt)
==23449==    by 0x4A7C62: FetchCredentialsFromCognito(Aws::CognitoIdentity::CognitoIdentityClient const&, Aws::Auth::PersistentCognitoIdentityProvider&, char const*, bool) (in /home/eugene/AWS/build-cognitoQt-Desktop_Qt_5_5_0_GCC_64bit-Release/cognitoQt)
==23449==    by 0x4A8C18: Aws::Auth::CognitoCachingAnonymousCredentialsProvider::GetCredentialsFromCognito() const (in /home/eugene/AWS/build-cognitoQt-Desktop_Qt_5_5_0_GCC_64bit-Release/cognitoQt)
==23449==    by 0x4A6284: Aws::Auth::CognitoCachingCredentialsProvider::GetAWSCredentials() (in /home/eugene/AWS/build-cognitoQt-Desktop_Qt_5_5_0_GCC_64bit-Release/cognitoQt)
==23449==    by 0x40A325: MainWindow::credentialsProviderTest() (in /home/eugene/AWS/build-cognitoQt-Desktop_Qt_5_5_0_GCC_64bit-Release/cognitoQt)
==23449==    by 0x40AD6F: MainWindow::MainWindow(QWidget*) (in /home/eugene/AWS/build-cognitoQt-Desktop_Qt_5_5_0_GCC_64bit-Release/cognitoQt)
==23449==    by 0x407414: main (in /home/eugene/AWS/build-cognitoQt-Desktop_Qt_5_5_0_GCC_64bit-Release/cognitoQt)
==23449==  If you believe this happened as a result of a stack
==23449==  overflow in your program's main thread (unlikely but
==23449==  possible), you can try to increase the size of the
==23449==  main thread stack using the --main-stacksize= flag.
==23449==  The main thread stack size used in this run was 8388608.
==23449== 
==23449== HEAP SUMMARY:
==23449==     in use at exit: 2,487,637 bytes in 27,401 blocks
==23449==   total heap usage: 62,508 allocs, 35,107 frees, 7,129,314 bytes allocated
==23449== 
==23449== LEAK SUMMARY:
==23449==    definitely lost: 2,889 bytes in 6 blocks
==23449==    indirectly lost: 12,924 bytes in 541 blocks
==23449==      possibly lost: 55,717 bytes in 774 blocks
==23449==    still reachable: 2,135,771 bytes in 25,047 blocks
==23449==         suppressed: 0 bytes in 0 blocks
==23449== Rerun with --leak-check=full to see details of leaked memory
==23449== 
==23449== For counts of detected and suppressed errors, rerun with: -v
==23449== Use --track-origins=yes to see where uninitialised values come from
==23449== ERROR SUMMARY: 4 errors from 4 contexts (suppressed: 0 from 0)
Killed

@JonathanHenson
Copy link
Contributor

thanks.

@JonathanHenson
Copy link
Contributor

Which libcurl-dev variation are you using on your Ubuntu machine?
On Oct 1, 2015 2:19 PM, "eugene345" notifications@github.com wrote:

Logging turned off:

==23449== Memcheck, a memory error detector
==23449== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
==23449== Using Valgrind-3.10.1 and LibVEX; rerun with -h for copyright info
==23449== Command: /home/eugene/AWS/build-cognitoQt-Desktop_Qt_5_5_0_GCC_64bit-Release/cognitoQt
==23449==
==23449== Conditional jump or move depends on uninitialised value(s)
==23449== at 0x154E834A: ??? (in /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0.2400.27)
==23449== by 0x8BFA503: ??? (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4400.1)
==23449== by 0x8C13FA6: g_signal_emit_valist (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4400.1)
==23449== by 0x8C14E49: g_signal_emit_by_name (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4400.1)
==23449== by 0x8C01C2A: g_object_set_valist (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4400.1)
==23449== by 0x8C024BB: g_object_set (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4400.1)
==23449== by 0x56BFA35: ??? (in /home/eugene/Qt/5.5/gcc_64/lib/libQt5Widgets.so.5.5.0)
==23449== by 0x564488C: QStyleFactory::create(QString const&) (in /home/eugene/Qt/5.5/gcc_64/lib/libQt5Widgets.so.5.5.0)
==23449== by 0x55DE5F4: QApplication::style() (in /home/eugene/Qt/5.5/gcc_64/lib/libQt5Widgets.so.5.5.0)
==23449== by 0x55DE884: QApplicationPrivate::initialize() (in /home/eugene/Qt/5.5/gcc_64/lib/libQt5Widgets.so.5.5.0)
==23449== by 0x55DE8CE: QApplicationPrivate::construct() (in /home/eugene/Qt/5.5/gcc_64/lib/libQt5Widgets.so.5.5.0)
==23449== by 0x40740A: main (in /home/eugene/AWS/build-cognitoQt-Desktop_Qt_5_5_0_GCC_64bit-Release/cognitoQt)
==23449==
==23449== Conditional jump or move depends on uninitialised value(s)
==23449== at 0x92BF1EB: g_utf8_offset_to_pointer (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4400.1)
==23449== by 0x154EB934: ??? (in /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0.2400.27)
==23449== by 0x154EBF4B: ??? (in /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0.2400.27)
==23449== by 0x154EC278: ??? (in /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0.2400.27)
==23449== by 0x8BFA2D4: g_closure_invoke (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4400.1)
==23449== by 0x8C0B912: ??? (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4400.1)
==23449== by 0x8C14697: g_signal_emit_valist (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4400.1)
==23449== by 0x8C148FE: g_signal_emit (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4400.1)
==23449== by 0x1567A913: gtk_widget_realize (in /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0.2400.27)
==23449== by 0x1567BBF7: gtk_widget_set_parent (in /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0.2400.27)
==23449== by 0x1551AD22: gtk_fixed_put (in /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0.2400.27)
==23449== by 0x8BFD586: g_cclosure_marshal_VOID__OBJECTv (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4400.1)
==23449==
==23449== Conditional jump or move depends on uninitialised value(s)
==23449== at 0x92BF212: g_utf8_offset_to_pointer (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4400.1)
==23449== by 0x154EB934: ??? (in /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0.2400.27)
==23449== by 0x154EBF4B: ??? (in /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0.2400.27)
==23449== by 0x154EC278: ??? (in /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0.2400.27)
==23449== by 0x8BFA2D4: g_closure_invoke (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4400.1)
==23449== by 0x8C0B912: ??? (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4400.1)
==23449== by 0x8C14697: g_signal_emit_valist (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4400.1)
==23449== by 0x8C148FE: g_signal_emit (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4400.1)
==23449== by 0x1567A913: gtk_widget_realize (in /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0.2400.27)
==23449== by 0x1567BBF7: gtk_widget_set_parent (in /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0.2400.27)
==23449== by 0x1551AD22: gtk_fixed_put (in /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0.2400.27)
==23449== by 0x8BFD586: g_cclosure_marshal_VOID__OBJECTv (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4400.1)
==23449==
==23449== Invalid read of size 4
==23449== at 0x465B23: Aws::Http::CurlHttpClient::MakeRequest(Aws::Http::HttpRequest&, Aws::Utils::RateLimits::RateLimiterInterface_, Aws::Utils::RateLimits::RateLimiterInterface_) const (in /home/eugene/AWS/build-cognitoQt-Desktop_Qt_5_5_0_GCC_64bit-Release/cognitoQt)
==23449== by 0x4554EA: Aws::Client::AWSClient::AttemptOneRequest(std::string const&, Aws::AmazonWebServiceRequest const&, Aws::Http::HttpMethod) const (in /home/eugene/AWS/build-cognitoQt-Desktop_Qt_5_5_0_GCC_64bit-Release/cognitoQt)
==23449== by 0x45586F: Aws::Client::AWSClient::AttemptExhaustively(std::string const&, Aws::AmazonWebServiceRequest const&, Aws::Http::HttpMethod) const (in /home/eugene/AWS/build-cognitoQt-Desktop_Qt_5_5_0_GCC_64bit-Release/cognitoQt)
==23449== by 0x458A1E: Aws::Client::AWSJsonClient::MakeRequest(std::string const&, Aws::AmazonWebServiceRequest const&, Aws::Http::HttpMethod) const (in /home/eugene/AWS/build-cognitoQt-Desktop_Qt_5_5_0_GCC_64bit-Release/cognitoQt)
==23449== by 0x484240: Aws::CognitoIdentity::CognitoIdentityClient::GetId(Aws::CognitoIdentity::Model::GetIdRequest const&) const (in /home/eugene/AWS/build-cognitoQt-Desktop_Qt_5_5_0_GCC_64bit-Release/cognitoQt)
==23449== by 0x4A7C62: FetchCredentialsFromCognito(Aws::CognitoIdentity::CognitoIdentityClient const&, Aws::Auth::PersistentCognitoIdentityProvider&, char const_, bool) (in /home/eugene/AWS/build-cognitoQt-Desktop_Qt_5_5_0_GCC_64bit-Release/cognitoQt)
==23449== by 0x4A8C18: Aws::Auth::CognitoCachingAnonymousCredentialsProvider::GetCredentialsFromCognito() const (in /home/eugene/AWS/build-cognitoQt-Desktop_Qt_5_5_0_GCC_64bit-Release/cognitoQt)
==23449== by 0x4A6284: Aws::Auth::CognitoCachingCredentialsProvider::GetAWSCredentials() (in /home/eugene/AWS/build-cognitoQt-Desktop_Qt_5_5_0_GCC_64bit-Release/cognitoQt)
==23449== by 0x40A325: MainWindow::credentialsProviderTest() (in /home/eugene/AWS/build-cognitoQt-Desktop_Qt_5_5_0_GCC_64bit-Release/cognitoQt)
==23449== by 0x40AD6F: MainWindow::MainWindow(QWidget_) (in /home/eugene/AWS/build-cognitoQt-Desktop_Qt_5_5_0_GCC_64bit-Release/cognitoQt)
==23449== by 0x407414: main (in /home/eugene/AWS/build-cognitoQt-Desktop_Qt_5_5_0_GCC_64bit-Release/cognitoQt)
==23449== Address 0xfffffffffffffff8 is not stack'd, malloc'd or (recently) free'd
==23449==
==23449==
==23449== Process terminating with default action of signal 11 (SIGSEGV)
==23449== Access not within mapped region at address 0xFFFFFFFFFFFFFFF8
==23449== at 0x465B23: Aws::Http::CurlHttpClient::MakeRequest(Aws::Http::HttpRequest&, Aws::Utils::RateLimits::RateLimiterInterface_, Aws::Utils::RateLimits::RateLimiterInterface_) const (in /home/eugene/AWS/build-cognitoQt-Desktop_Qt_5_5_0_GCC_64bit-Release/cognitoQt)
==23449== by 0x4554EA: Aws::Client::AWSClient::AttemptOneRequest(std::string const&, Aws::AmazonWebServiceRequest const&, Aws::Http::HttpMethod) const (in /home/eugene/AWS/build-cognitoQt-Desktop_Qt_5_5_0_GCC_64bit-Release/cognitoQt)
==23449== by 0x45586F: Aws::Client::AWSClient::AttemptExhaustively(std::string const&, Aws::AmazonWebServiceRequest const&, Aws::Http::HttpMethod) const (in /home/eugene/AWS/build-cognitoQt-Desktop_Qt_5_5_0_GCC_64bit-Release/cognitoQt)
==23449== by 0x458A1E: Aws::Client::AWSJsonClient::MakeRequest(std::string const&, Aws::AmazonWebServiceRequest const&, Aws::Http::HttpMethod) const (in /home/eugene/AWS/build-cognitoQt-Desktop_Qt_5_5_0_GCC_64bit-Release/cognitoQt)
==23449== by 0x484240: Aws::CognitoIdentity::CognitoIdentityClient::GetId(Aws::CognitoIdentity::Model::GetIdRequest const&) const (in /home/eugene/AWS/build-cognitoQt-Desktop_Qt_5_5_0_GCC_64bit-Release/cognitoQt)
==23449== by 0x4A7C62: FetchCredentialsFromCognito(Aws::CognitoIdentity::CognitoIdentityClient const&, Aws::Auth::PersistentCognitoIdentityProvider&, char const_, bool) (in /home/eugene/AWS/build-cognitoQt-Desktop_Qt_5_5_0_GCC_64bit-Release/cognitoQt)
==23449== by 0x4A8C18: Aws::Auth::CognitoCachingAnonymousCredentialsProvider::GetCredentialsFromCognito() const (in /home/eugene/AWS/build-cognitoQt-Desktop_Qt_5_5_0_GCC_64bit-Release/cognitoQt)
==23449== by 0x4A6284: Aws::Auth::CognitoCachingCredentialsProvider::GetAWSCredentials() (in /home/eugene/AWS/build-cognitoQt-Desktop_Qt_5_5_0_GCC_64bit-Release/cognitoQt)
==23449== by 0x40A325: MainWindow::credentialsProviderTest() (in /home/eugene/AWS/build-cognitoQt-Desktop_Qt_5_5_0_GCC_64bit-Release/cognitoQt)
==23449== by 0x40AD6F: MainWindow::MainWindow(QWidget_) (in /home/eugene/AWS/build-cognitoQt-Desktop_Qt_5_5_0_GCC_64bit-Release/cognitoQt)
==23449== by 0x407414: main (in /home/eugene/AWS/build-cognitoQt-Desktop_Qt_5_5_0_GCC_64bit-Release/cognitoQt)
==23449== If you believe this happened as a result of a stack
==23449== overflow in your program's main thread (unlikely but
==23449== possible), you can try to increase the size of the
==23449== main thread stack using the --main-stacksize= flag.
==23449== The main thread stack size used in this run was 8388608.
==23449==
==23449== HEAP SUMMARY:
==23449== in use at exit: 2,487,637 bytes in 27,401 blocks
==23449== total heap usage: 62,508 allocs, 35,107 frees, 7,129,314 bytes allocated
==23449==
==23449== LEAK SUMMARY:
==23449== definitely lost: 2,889 bytes in 6 blocks
==23449== indirectly lost: 12,924 bytes in 541 blocks
==23449== possibly lost: 55,717 bytes in 774 blocks
==23449== still reachable: 2,135,771 bytes in 25,047 blocks
==23449== suppressed: 0 bytes in 0 blocks
==23449== Rerun with --leak-check=full to see details of leaked memory
==23449==
==23449== For counts of detected and suppressed errors, rerun with: -v
==23449== Use --track-origins=yes to see where uninitialised values come from
==23449== ERROR SUMMARY: 4 errors from 4 contexts (suppressed: 0 from 0)
Killed


Reply to this email directly or view it on GitHub
#19 (comment).

@eugene345
Copy link
Author

Not sure about the previous version, but yesterday I installed latest curl from sources. No changes.

@JonathanHenson
Copy link
Contributor

Can you swap out CurlHttpClient with this code, recompile and see what happens?

/*
  * Copyright 2010-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.
  * 
  * Licensed under the Apache License, Version 2.0 (the "License").
  * You may not use this file except in compliance with the License.
  * A copy of the License is located at
  * 
  *  http://aws.amazon.com/apache2.0
  * 
  * or in the "license" file accompanying this file. This file is distributed
  * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
  * express or implied. See the License for the specific language governing
  * permissions and limitations under the License.
  */

#include <aws/core/http/curl/CurlHttpClient.h>


#include <aws/core/http/HttpRequest.h>
#include <aws/core/http/standard/StandardHttpResponse.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/logging/LogMacros.h>
#include <aws/core/utils/ratelimiter/RateLimiterInterface.h>

#include <algorithm>


using namespace Aws::Client;
using namespace Aws::Http;
using namespace Aws::Http::Standard;
using namespace Aws::Utils;
using namespace Aws::Utils::Logging;


struct CurlWriteCallbackContext
{
    CurlWriteCallbackContext(const CurlHttpClient* client,
                             HttpRequest* request, 
                             HttpResponse* response, 
                             Aws::Utils::RateLimits::RateLimiterInterface* rateLimiter) :
        m_client(client),
        m_request(request),
        m_response(response),
        m_rateLimiter(rateLimiter)
    {}

    const CurlHttpClient* m_client;
    HttpRequest* m_request;
    HttpResponse* m_response;
    Aws::Utils::RateLimits::RateLimiterInterface* m_rateLimiter;
};

struct CurlReadCallbackContext
{
    CurlReadCallbackContext(const CurlHttpClient* client, HttpRequest* request) :
        m_client(client),
        m_request(request)
    {}

    const CurlHttpClient* m_client;
    HttpRequest* m_request;
};

static const char* CurlTag = "CurlHttpClient";

void SetOptCodeForHttpMethod(CURL* requestHandle, const HttpRequest& request)
{
    switch (request.GetMethod())
    {
        case HttpMethod::HTTP_GET:
            curl_easy_setopt(requestHandle, CURLOPT_HTTPGET, 1L);
            break;
        case HttpMethod::HTTP_POST:

            if (!request.HasHeader(Aws::Http::CONTENT_LENGTH_HEADER))
            {
                curl_easy_setopt(requestHandle, CURLOPT_CUSTOMREQUEST, "POST");
            }
            else
            {
                curl_easy_setopt(requestHandle, CURLOPT_POST, 1L);
            }
            break;
        case HttpMethod::HTTP_PUT:
            if (!request.HasHeader(Aws::Http::CONTENT_LENGTH_HEADER))
            {
                curl_easy_setopt(requestHandle, CURLOPT_CUSTOMREQUEST, "PUT");
            }
            else
            {
                curl_easy_setopt(requestHandle, CURLOPT_PUT, 1L);
            }
            break;
        case HttpMethod::HTTP_HEAD:
            curl_easy_setopt(requestHandle, CURLOPT_HTTPGET, 1L);
            curl_easy_setopt(requestHandle, CURLOPT_NOBODY, 1L);
            break;
        default:
            curl_easy_setopt(requestHandle, CURLOPT_CUSTOMREQUEST, "DELETE");
            break;
    }
}

CurlHttpClient::CurlHttpClient(const ClientConfiguration& clientConfig) :
    Base(),   
    m_curlHandleContainer(clientConfig.maxConnections, clientConfig.requestTimeoutMs, clientConfig.connectTimeoutMs),
    m_isUsingProxy(!clientConfig.proxyHost.empty()), m_proxyUserName(clientConfig.proxyUserName),
    m_proxyPassword(clientConfig.proxyPassword), m_proxyHost(clientConfig.proxyHost),
    m_proxyPort(clientConfig.proxyPort), m_verifySSL(clientConfig.verifySSL), m_allowRedirects(clientConfig.followRedirects)
{
}


std::shared_ptr<HttpResponse> CurlHttpClient::MakeRequest(HttpRequest& request, Aws::Utils::RateLimits::RateLimiterInterface* readLimiter,
                                                          Aws::Utils::RateLimits::RateLimiterInterface* writeLimiter) const
{
    Aws::String url = request.GetURIString();
    AWS_LOGSTREAM_TRACE(CurlTag, "Making request to " << url);
    struct curl_slist* headers = NULL;

    if (writeLimiter != nullptr)
    {
        writeLimiter->ApplyAndPayForCost(request.GetSize());
    }

    Aws::StringStream headerStream;
    HeaderValueCollection requestHeaders = request.GetHeaders();

    AWS_LOG_TRACE(CurlTag, "Including headers:");
    for (auto& requestHeader : requestHeaders)
    {
        headerStream.str("");
        headerStream << requestHeader.first << ": " << requestHeader.second;
        Aws::String headerString = headerStream.str();
        AWS_LOGSTREAM_TRACE(CurlTag, headerString);
        headers = curl_slist_append(headers, headerString.c_str());
    }
    headers = curl_slist_append(headers, "transfer-encoding:");

    if (!request.HasHeader(Http::CONTENT_LENGTH_HEADER))
    {
        headers = curl_slist_append(headers, "content-length:");
    }

    if (!request.HasHeader(Http::CONTENT_TYPE_HEADER))
    {
        headers = curl_slist_append(headers, "content-type:");
    }

    std::shared_ptr<HttpResponse> response(nullptr);
    CURL* connectionHandle = m_curlHandleContainer.AcquireCurlHandle();

    if (connectionHandle)
    {
        AWS_LOGSTREAM_DEBUG(CurlTag, "Obtained connection handle " << connectionHandle);

        if (headers)
        {
            curl_easy_setopt(connectionHandle, CURLOPT_HTTPHEADER, headers);
        }

        response = Aws::MakeShared<StandardHttpResponse>(CurlTag, request);
        CurlWriteCallbackContext writeContext(this, &request, response.get(), readLimiter);
        CurlReadCallbackContext readContext(this, &request);

        SetOptCodeForHttpMethod(connectionHandle, request);
        curl_easy_setopt(connectionHandle, CURLOPT_URL, url.c_str());
        curl_easy_setopt(connectionHandle, CURLOPT_WRITEFUNCTION, &CurlHttpClient::WriteData);
        curl_easy_setopt(connectionHandle, CURLOPT_WRITEDATA, &writeContext);
        curl_easy_setopt(connectionHandle, CURLOPT_HEADERFUNCTION, &CurlHttpClient::WriteHeader);
        curl_easy_setopt(connectionHandle, CURLOPT_HEADERDATA, response.get());

        if (m_verifySSL)
        {
            curl_easy_setopt(connectionHandle, CURLOPT_SSL_VERIFYPEER, 1L);
            curl_easy_setopt(connectionHandle, CURLOPT_SSL_VERIFYHOST, 2L);

#if LIBCURL_VERSION_MAJOR >= 7
#if LIBCURL_VERSION_MINOR >= 34
            curl_easy_setopt(connectionHandle, CURLOPT_SSLVERSION, CURL_SSLVERSION_TLSv1);
#endif //LIBCURL_VERSION_MINOR
#endif //LIBCURL_VERSION_MAJOR
        }
        else
        {
            curl_easy_setopt(connectionHandle, CURLOPT_SSL_VERIFYPEER, 0L);
            curl_easy_setopt(connectionHandle, CURLOPT_SSL_VERIFYHOST, 0L);
        }

        if (m_allowRedirects)
        {
            curl_easy_setopt(connectionHandle, CURLOPT_FOLLOWLOCATION, 1L);
        }
        else
        {
            curl_easy_setopt(connectionHandle, CURLOPT_FOLLOWLOCATION, 0L);
        }
        //curl_easy_setopt(connectionHandle, CURLOPT_VERBOSE, 1);

        if (m_isUsingProxy)
        {
            curl_easy_setopt(connectionHandle, CURLOPT_PROXY, m_proxyHost.c_str());
            curl_easy_setopt(connectionHandle, CURLOPT_PROXYPORT, (long) m_proxyPort);
            curl_easy_setopt(connectionHandle, CURLOPT_PROXYUSERNAME, m_proxyUserName.c_str());
            curl_easy_setopt(connectionHandle, CURLOPT_PROXYPASSWORD, m_proxyPassword.c_str());
        }

        if (request.GetContentBody())
        {
            curl_easy_setopt(connectionHandle, CURLOPT_READFUNCTION, &CurlHttpClient::ReadBody);
            curl_easy_setopt(connectionHandle, CURLOPT_READDATA, &readContext);
        }

        CURLcode curlResponseCode = curl_easy_perform(connectionHandle);
        if (curlResponseCode != CURLE_OK)
        {
            response = nullptr;
            AWS_LOGSTREAM_ERROR(CurlTag, "Curl returned error code " << curlResponseCode);
        }
        else
        {
            long responseCode;
            curl_easy_getinfo(connectionHandle, CURLINFO_RESPONSE_CODE, &responseCode);
            response->SetResponseCode(static_cast<HttpResponseCode>(responseCode));
            AWS_LOGSTREAM_DEBUG(CurlTag, "Returned http response code " << responseCode);

            char* contentType = nullptr;
            curl_easy_getinfo(connectionHandle, CURLINFO_CONTENT_TYPE, &contentType);
            if (contentType)
            {
                response->SetContentType(contentType);
                AWS_LOGSTREAM_DEBUG(CurlTag, "Returned content type " << contentType);
            }
            curl_easy_reset(connectionHandle);
            AWS_LOGSTREAM_DEBUG(CurlTag, "Releasing curl handle " << connectionHandle);
        }

        m_curlHandleContainer.ReleaseCurlHandle(connectionHandle);
    }

    if (headers)
    {
        curl_slist_free_all(headers);
    }

    return response;
}


size_t CurlHttpClient::WriteData(char* ptr, size_t size, size_t nmemb, void* userdata)
{
    if (ptr)
    {
        CurlWriteCallbackContext* context = reinterpret_cast<CurlWriteCallbackContext*>(userdata);

        const CurlHttpClient* client = context->m_client;
        if(!client->IsRequestProcessingEnabled())
        {
            return 0;
        }

        HttpResponse* response = context->m_response;
        size_t sizeToWrite = size * nmemb;
        if (context->m_rateLimiter)
        {
            context->m_rateLimiter->ApplyAndPayForCost(static_cast<int64_t>(sizeToWrite));
        }

        response->GetResponseBody().write(ptr, static_cast<std::streamsize>(sizeToWrite));
        auto& receivedHandler = context->m_request->GetDataReceivedEventHandler();
        if (receivedHandler)
        {
            receivedHandler(context->m_request, context->m_response, static_cast<long long>(sizeToWrite));
        }

        AWS_LOGSTREAM_TRACE(CurlTag, sizeToWrite << " bytes written to response.");
        return sizeToWrite;
    }
    return 0;
}

size_t CurlHttpClient::WriteHeader(char* ptr, size_t size, size_t nmemb, void* userdata)
{
    if (ptr)
    {
        AWS_LOGSTREAM_TRACE(CurlTag, ptr);
        HttpResponse* response = (HttpResponse*) userdata;
        Aws::String headerLine(ptr);
        Aws::Vector<Aws::String> keyValuePair = StringUtils::Split(headerLine, ':');


        if (keyValuePair.size() > 1)
        {
            Aws::String headerName = keyValuePair[0];
            headerName = StringUtils::Trim(headerName.c_str());


            Aws::String headerValue = headerLine.substr(headerName.length() + 1).c_str();
            headerValue = StringUtils::Trim(headerValue.c_str());


            response->AddHeader(headerName, headerValue);
        }
        return size * nmemb;
    }
    return 0;
}


size_t CurlHttpClient::ReadBody(char* ptr, size_t size, size_t nmemb, void* userdata)
{
    CurlReadCallbackContext* context = reinterpret_cast<CurlReadCallbackContext*>(userdata);
    if(context == nullptr)
    {
        return 0;
    }

    const CurlHttpClient* client = context->m_client;
    if(!client->IsRequestProcessingEnabled())
    {
        return 0;
    }

    HttpRequest* request = context->m_request;
    std::shared_ptr<Aws::IOStream> ioStream = request->GetContentBody();

    if (ioStream != nullptr && size * nmemb)
    {
        auto currentPos = ioStream->tellg();
        ioStream->seekg(0, ioStream->end);
        auto length = ioStream->tellg();
        ioStream->seekg(currentPos, ioStream->beg);
        size_t amountToRead = static_cast< size_t >(std::min<decltype(length)>(length - currentPos, size * nmemb));

        ioStream->read(ptr, amountToRead);
        auto& sentHandler = request->GetDataSentEventHandler();
        if (sentHandler)
        {
            sentHandler(request, amountToRead);
        }

        return amountToRead;
    }

    return 0;
}

@eugene345
Copy link
Author

I tried to compile it, but got few errors:

/home/eugene/aws-sdk-cpp/aws-cpp-sdk-core/source/http/curl/CurlHttpClient.cpp: In constructor ‘Aws::Http::CurlHttpClient::CurlHttpClient(const Aws::Client::ClientConfiguration&)’:
/home/eugene/aws-sdk-cpp/aws-cpp-sdk-core/source/http/curl/CurlHttpClient.cpp:105:5: error: class ‘Aws::Http::CurlHttpClient’ does not have any field named ‘Base’
     Base(),   
     ^
/home/eugene/aws-sdk-cpp/aws-cpp-sdk-core/source/http/curl/CurlHttpClient.cpp: In static member function ‘static size_t Aws::Http::CurlHttpClient::WriteData(char*, size_t, size_t, void*)’:
/home/eugene/aws-sdk-cpp/aws-cpp-sdk-core/source/http/curl/CurlHttpClient.cpp:257:21: error: ‘const class Aws::Http::CurlHttpClient’ has no member named ‘IsRequestProcessingEnabled’
         if(!client->IsRequestProcessingEnabled())
                     ^
/home/eugene/aws-sdk-cpp/aws-cpp-sdk-core/source/http/curl/CurlHttpClient.cpp: In static member function ‘static size_t Aws::Http::CurlHttpClient::ReadBody(char*, size_t, size_t, void*)’:
/home/eugene/aws-sdk-cpp/aws-cpp-sdk-core/source/http/curl/CurlHttpClient.cpp:319:17: error: ‘const class Aws::Http::CurlHttpClient’ has no member named ‘IsRequestProcessingEnabled’
     if(!client->IsRequestProcessingEnabled())
                 ^
At global scope:
cc1plus: error: unrecognized command line option "-Wno-unused-private-field" [-Werror]
cc1plus: all warnings being treated as errors
aws-cpp-sdk-core/CMakeFiles/aws-cpp-sdk-core.dir/build.make:638: recipe for target 'aws-cpp-sdk-core/CMakeFiles/aws-cpp-sdk-core.dir/source/http/curl/CurlHttpClient.cpp.o' failed
make[2]: *** [aws-cpp-sdk-core/CMakeFiles/aws-cpp-sdk-core.dir/source/http/curl/CurlHttpClient.cpp.o] Error 1
CMakeFiles/Makefile2:85: recipe for target 'aws-cpp-sdk-core/CMakeFiles/aws-cpp-sdk-core.dir/all' failed
make[1]: *** [aws-cpp-sdk-core/CMakeFiles/aws-cpp-sdk-core.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2

I commented lines in CurlHttpClient which caused errors and compiled successfully. Now release build on linux works fine and there is no segfault error.

@JonathanHenson
Copy link
Contributor

Sorry, there is a merge in there for some new features I forgot about.

Did you mean release build works with no errors? Or have you not tried that
yet?
On Oct 5, 2015 7:27 AM, "eugene345" notifications@github.com wrote:

I tried to compile it, but got few errors:

/home/eugene/aws-sdk-cpp/aws-cpp-sdk-core/source/http/curl/CurlHttpClient.cpp: In constructor ‘Aws::Http::CurlHttpClient::CurlHttpClient(const Aws::Client::ClientConfiguration&)’:
/home/eugene/aws-sdk-cpp/aws-cpp-sdk-core/source/http/curl/CurlHttpClient.cpp:105:5: error: class ‘Aws::Http::CurlHttpClient’ does not have any field named ‘Base’
Base(),
^
/home/eugene/aws-sdk-cpp/aws-cpp-sdk-core/source/http/curl/CurlHttpClient.cpp: In static member function ‘static size_t Aws::Http::CurlHttpClient::WriteData(char_, size_t, size_t, void_)’:
/home/eugene/aws-sdk-cpp/aws-cpp-sdk-core/source/http/curl/CurlHttpClient.cpp:257:21: error: ‘const class Aws::Http::CurlHttpClient’ has no member named ‘IsRequestProcessingEnabled’
if(!client->IsRequestProcessingEnabled())
^
/home/eugene/aws-sdk-cpp/aws-cpp-sdk-core/source/http/curl/CurlHttpClient.cpp: In static member function ‘static size_t Aws::Http::CurlHttpClient::ReadBody(char_, size_t, size_t, void_)’:
/home/eugene/aws-sdk-cpp/aws-cpp-sdk-core/source/http/curl/CurlHttpClient.cpp:319:17: error: ‘const class Aws::Http::CurlHttpClient’ has no member named ‘IsRequestProcessingEnabled’
if(!client->IsRequestProcessingEnabled())
^
At global scope:
cc1plus: error: unrecognized command line option "-Wno-unused-private-field" [-Werror]
cc1plus: all warnings being treated as errors
aws-cpp-sdk-core/CMakeFiles/aws-cpp-sdk-core.dir/build.make:638: recipe for target 'aws-cpp-sdk-core/CMakeFiles/aws-cpp-sdk-core.dir/source/http/curl/CurlHttpClient.cpp.o' failed
make[2]: *** [aws-cpp-sdk-core/CMakeFiles/aws-cpp-sdk-core.dir/source/http/curl/CurlHttpClient.cpp.o] Error 1
CMakeFiles/Makefile2:85: recipe for target 'aws-cpp-sdk-core/CMakeFiles/aws-cpp-sdk-core.dir/all' failed
make[1]: *** [aws-cpp-sdk-core/CMakeFiles/aws-cpp-sdk-core.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2

I commented lines in CurlHttpClient which caused errors and compiled
successfully. Now debug build on linux works fine and there is no segfault
error.


Reply to this email directly or view it on GitHub
#19 (comment).

@eugene345
Copy link
Author

Sorry, yes, I mean release build works fine.

@JonathanHenson
Copy link
Contributor

Ok, I fixed a bunch of suspicious things in there. Could you check size of
int and size of long on your system?
On Oct 5, 2015 7:32 AM, "eugene345" notifications@github.com wrote:

Sorry, yes, I mean release build works fine.


Reply to this email directly or view it on GitHub
#19 (comment).

@eugene345
Copy link
Author

int - 4 bytes
long - 8 bytes

@JonathanHenson
Copy link
Contributor

That was it. Cool. We've got another build coming out today and it will
contain the fix for you. Sorry for the inconvenience and thank you for your
patience.
On Oct 5, 2015 7:37 AM, "eugene345" notifications@github.com wrote:

int - 4 bytes
long - 8 bytes


Reply to this email directly or view it on GitHub
#19 (comment).

@eugene345
Copy link
Author

Thank you too!

@JonathanHenson
Copy link
Contributor

fix has been pushed. If you have time could you confirm everything works for you now and then close the issue if it has been fixed?

@eugene345
Copy link
Author

Yes, the bug is fixed now.

krzysztof-trzepla pushed a commit to krzysztof-trzepla/aws-sdk-cpp that referenced this issue May 21, 2016
…ocker to develop

# By Konrad Zemek
# Via Konrad Zemek
* commit '23adadc60e7c41d70f59c9c3b0272aa68bba9868':
  VFS-1008 Move timeout values to top of their files.
  VFS-1008 Integrate riak into oneprovider.
  VFS_1008 Fix providing custom node number for Riak docker.
  VFS-1008 Create a riak docker.
krzysztof-trzepla added a commit to krzysztof-trzepla/aws-sdk-cpp that referenced this issue May 21, 2016
6280b36 Add open function overload that takes flags as integer.
b4fd726 Merge pull request aws#160 in VFS/helpers from feature/VFS-1529-autodetect-available-storages-in to develop
300baca Merge pull request aws#166 in VFS/helpers from feature/VFS-1621-oneclient-package-docker-plan-at to develop
a25e655 Releasing new version 2.0.1
fc63cff Merge branch 'develop' of ssh://git.plgrid.pl:7999/vfs/helpers into feature/VFS-1529-autodetect-available-storages-in
f14c519 Merge commit '18d7abee1407a200a85913d9588c4202969a3bab' into feature/VFS-1621-oneclient-package-docker-plan-at
18d7abe Squashed 'bamboos/' changes from ccb41c3..a30c6f2
96db294 Merge branch 'develop' of ssh://git.plgrid.pl:7999/vfs/helpers into feature/VFS-1621-oneclient-package-docker-plan-at
8c89871 Merge pull request aws#157 in VFS/helpers from feature/VFS-1525-oneclient-opens-files-before-read-writes to develop
c1e52f6 VFS-1529 Remove unnecessary capture.
bbc7df5 VFS-1525 Refactor for loop
a487e47 VFS-1529 Change logging level in storage helpers. Use glog for logging unordered maps.
b27da4a VFS-1525 Remove openFile method from helpers
130d1d6 VFS-1525 Parsing flags in IStorageHelper
32e5f0a VFS-1529 Add logs in case of raw helper context cast failure.
ec39595 Squashed 'bamboos/' changes from ca613bd..ccb41c3
35a79cc Merge commit 'ec39595c37033057fce6be09f0eb546a5213dcb6' into feature/VFS-1621-oneclient-package-docker-plan-at
d879dd7 Merge pull request aws#162 in VFS/helpers from feature/VFS-1608-integrate-ember-gui-production-build to develop
1247e61 VFS-1529 Return new helper context if raw context cast fails.
b92d950 Merge commit 'a61ce189983d1c3b6c96ce4605174b5d299c40d9' into feature/VFS-1529-autodetect-available-storages-in
a61ce18 Squashed 'clproto/' changes from a860fe1..a982eb9
3e3a042 Merge commit 'c4162767e912534d47a46fd5ff857aecaa099069' into feature/VFS-1608-integrate-ember-gui-production-build
c416276 Squashed 'appmock/' changes from 2f5d162..68aaf01
5b45a4a Merge commit 'db705cb3f5e23f2178dd6c5af46f1863427e0a63' into feature/VFS-1608-integrate-ember-gui-production-build
db705cb Squashed 'bamboos/' changes from 8e869b3..2f522cc
d17fbf9 Merge branch 'develop' of ssh://git.plgrid.pl:7999/vfs/helpers into feature/VFS-1529-autodetect-available-storages-in
58c5f06 Merge commit '05d800615c88635213e452411abd0c8e8a576f32' into feature/VFS-1529-autodetect-available-storages-in
05d8006 Squashed 'clproto/' changes from 85adaf8..a860fe1
aea2c4e Merge commit 'aab4a7aa6bb6efb90ca367e6651040b8cd080edb' into feature/VFS-1608-integrate-ember-gui-production-build
aab4a7a Squashed 'appmock/' changes from 0999c5d..2f5d162
2bc1d01 Squashed 'bamboos/' changes from ca613bd..8e869b3
a2c1622 Merge commit '2bc1d01226ae228ed3c1ae568bfe148fbb97ce8a' into feature/VFS-1608-integrate-ember-gui-production-build
da581c3 Merge pull request aws#161 in VFS/helpers from feature/VFS-1571-speed-up-compilation-through-caching to develop
53f3f4e Squashed 'bamboos/' changes from f0eb1c2..ca613bd
a84ba85 Merge commit '53f3f4e33ee0f70c4a1ddb8c05e10b9946f4c8a8' into feature/VFS-1571-speed-up-compilation-through-caching
d7525b3 Merge commit '0de736692e1bfb439c5a9d1f1d81c0da15e6b8e7' into feature/VFS-1571-speed-up-compilation-through-caching
0de7366 Squashed 'appmock/' changes from 0e1718a..0999c5d
29dd11b Releasing new version 2.0.0
e81f3ca Delete ReleaseNotes
5660da3 VFS-1525 Make flag translation public for use in open.
ee56cc2 Merge pull request aws#159 in VFS/helpers from feature/VFS-1522-file-block-invalidation to develop
fc94f83 VFS-1525 Update sh_open with FlagsSet
32a6ae0 Merge branch 'develop' into feature/VFS-1525-oneclient-opens-files-before-read-writes
517b81f VFS-1529 Remove code duplication in S3 storage helper.
2f80783 VFS-1529 Throw exception in storage helper factory if helper name doesn't match.
02032da Merge commit '41dcd1ed10fad162f488220744d14cb3c24689b8' into feature/VFS-1529-autodetect-available-storages-in
41dcd1e Squashed 'clproto/' changes from 74839e4..85adaf8
85fdaad VFS-1529 Add mechanism for automatic detection of directly accessible storages.
7c64a2d Merge branch 'develop' into feature/VFS-1522-file-block-invalidation
f5e1777 Merge commit '4d2e84b125eafd8d0a566e5cd161a9a0bc2dc420' into feature/VFS-1522-file-block-invalidation
4d2e84b Squashed 'clproto/' changes from 8dd55d1..fa290fc
92a0605 Merge commit '6629b62f4e50c74f28837d5445610f600f7169ab' into feature/VFS-1529-autodetect-available-storages-in
6629b62 Squashed 'clproto/' changes from 029c696..74839e4
d98a97d Merge pull request aws#156 in VFS/helpers from feature/merge-storage-helpers-functionality to develop
9d30f8f Merge commit '063878aab71f2eb6efedd9a988b529eb5d1971be' into feature/VFS-1522-file-block-invalidation
063878a Squashed 'clproto/' changes from 9fc119c..8dd55d1
3954cb7 Merge branch 'develop' of ssh://git.plgrid.pl:7999/vfs/helpers into feature/merge-storage-helpers-functionality
de91cbc Merge branch 'develop' of ssh://git.plgrid.pl:7999/vfs/helpers into feature/merge-storage-helpers-functionality
1940bfb Merge pull request aws#154 in VFS/helpers from feature/VFS-1450-3-acl-improvements to develop
b6bc3e5 Merge branch 'develop' into feature/VFS-1450-3-acl-improvements
5e72838 Merge pull request aws#158 in VFS/helpers from bugfix/fix-integration-tests to develop
1ac6141 Fix integration tests.
e90f30f Squashed 'bamboos/' changes from b146078..f0eb1c2
7adc9a9 Merge commit 'e90f30f645452d8b8deb9a3cabe3a2fac30ec037' into develop
26941d1 Change flags container from vector to unordered set.
b2d2b32 VFS-1525 Synchronous version of open and release methods
648169c VFS-1450 Remove unused import.
8295e12 VFS-1450 Additional merge changes.
5ff1c94 Squashed 'clproto/' changes from 10384fc..9fc119c
3854ab1 Merge commit '5ff1c9491e62a5ff28a7f6b3369d98a5223dc37b' into feature/VFS-1450-3-acl-improvements
0c0e653 Merge branch 'develop' into feature/VFS-1450-3-acl-improvements
4815130 VFS-1450 Add permission_changed_event.
179c192 VFS-1450 Apply clang-format.
e4d1cfa VFS-1450 Adjust tests to new helper interface.
ae81389 Merge commit 'e39f71962e05fa32629c75fcabc85cca6e15112b' into feature/VFS-1450-acl-improvements
60546a5 VFS-1450 Add fileUuid argument to read and write operations in IStorageHelper.
5b34cdc VFS-1450 Remove storage_id from get_helper_args message
149b44a VFS-1450 Update clproto.
5049adf Merge commit '52fc8c5e28c809bdef6303f3091a319bdf1a61e9' into feature/VFS-1450-acl-improvements
3483f26 VFS-1398 Change ProxyIORequest.space_id to ProxyIORequest.file_uuid.
721b621 VFS-1376 Change subscriptions processing on handshake. Add subscription container wrapper.
f7aeda4 Merge branch 'develop' of ssh://git.plgrid.pl:7999/vfs/oneclient into feature/VFS-1376-acceptance-tests-for-events
10384fc Merge pull request aws#99 in VFS/clproto from feature/VFS-1398-cdmi-metadata to develop
0856cbb Merge pull request aws#97 in VFS/clproto from feature/VFS-1371-clusterproxy-storage-helper to develop
d6915d1 Merge commit '9a0454281fcd3fecd189fc4798a9bea2c7d33b7d' into feature/VFS-1371-clusterproxy-storage-helper
4ebb492 Merge remote-tracking branch 'origin/develop' into feature/VFS-1371-clusterproxy-storage-helper
8afb7e1 VFS-1371 Add SpaceId to GetHelperParams and FileLocation.
2e82140 VFS-1371 Add space_id to ProxyIORequest.
e095c2e Merge remote-tracking branch 'origin/feature/VFS-1371-clusterproxy-storage-helper_merge' into feature/VFS-1371-clusterproxy-storage-helper
aa81caa Merge remote-tracking branch 'origin/develop' into feature/VFS-1371-clusterproxy-storage-helper
dd0b1a6 VFS-1376 Fix spinlock in TypedStream and client hang when unmounting in the foreground.
d1bfbca VFS-1398 Rename xattr.key to xattr.name.
b38ccbb Merge commit '9b37f4c643fd7a22cbb9f98be676c4f93e0a9289' into feature/VFS-1376-acceptance-tests-for-events
6b4c704 VFS-1398 Add xattr messages to possible fuse messages.
4a969b5 Merge branch 'feature/VFS-1407-client-get-subscriptions-on-handshake' into feature/VFS-1398-cdmi-metadata
e640bcc VFS-1398 Add xattr messages.
8ac886e VFS-1407 Getting subscriptions on handshake response.
7689bb6 VFS-1407 Getting subscriptions on handshake response.
a68b34f Merge remote-tracking branch 'origin/develop' into feature/VFS-1371-clusterproxy-storage-helper
5bae72d VFS-1371 Remove SpaceID from ProxyIO arguments.
9689405 Merge commit '3000ff39ed9e607e583d0411fea900332242eb1a' into feature/VFS-1371-clusterproxy-storage-helper
7e5d95b VFS-1371 Add POSIX error codes.
a9da5c4 VFS-1289 Enable NIF library build.
4b9a5e0 VFS-1289 Fix compilation errors of NIF libs.
277fd05 Merge branch 'feature/VFS-1371-clusterproxy-storage-helper_merge' into feature/VFS-1371-clusterproxy-storage-helper
2d49007 VFS-1371 Add protocol messages for ProxyIO helper.
b11995b Merge pull request aws#96 in VFS/clproto from feature/VFS-1289-event-manager-for-one-client-v.3.0 to develop
a10c6f5 Merge commit '65470c82c12f8a2644f2509a330a6be4387ba4f0' into feature/VFS-1289-event-manager-for-one-client-v.3.0
e78734c VFS-1289 Add message that can carry multiple events of the same type.
00e73be Merge pull request aws#95 in VFS/clproto from feature/VFS-1289-event-manager-for-one-client-v.3.0 to develop
d2b074b Merge commit '4412137cb52755a79d4ae9f2714c771417c6d620' into feature/VFS-1361-rebase-build-dockers-on-ubuntu-15.10
3b15520 Merge commit '347fc6b6b2e6b4676a8eb00f45805823ff9f6fe9' into feature/VFS-1289-event-manager-for-one-client-v.3.0
f7f9162 VFS-1289 Make stream ID optional in MessageStreamReset message.
863b0ca VFS-1289 Change type of subscription ID from unsigned to signed integer.
409c062 VFS-1289 Add stream ID to stream reset message.
6498a3f VFS-1289 Change name of 'oneof' constructions in event messages.
7456587 VFS-1289 Enable NIF library build.
197b171 VFS-1289 New events multilayer architecture. Unit and integration tests extension.
e547efc VFS-1289 New events multilayer architecture. Unit and integration tests extension.
2bfbbfd Merge commit '53600cf9070a265d32ddb20a03b348efe37cb1c3' into bugfix/VFS-1255-onedata-packages-is-green-on-bamboo
cc6d274 Merge commit 'bfa0f14acf0ebe4ae00ef0d2b8885b3a8c7a89a2' into feature/VFS-1289-event-manager-for-one-client-v.3.0
24bc3db VFS-1289 Fix compilation errors of NIF libs.
a47f9c5 Merge commit '550e45ccae7d729e6325d6f80986a112ac012791' into feature/VFS-1289-event-manager-for-one-client-v.3.0
33b7776 Merge commit '1a1105c65d9a2e13d99effa9d9f331beb6ba93b1' into feature/VFS-1289-event-manager-for-one-client-v.3.0
93e9422 Implement sequencer tests.
1219ed3 Merge commit '34caa7f1ce287843c8f7db7d8fc31e5efacd8140' into feature/VFS-1289-event-manager-for-one-client-v.3.0
6891efe VFS-1289 Implement sequencer behaviour.
fa07703 VFS-1289 Implement sequencer behaviour.
dac645c Merge branch 'develop' of ssh://git.plgrid.pl:7999/vfs/oneclient into feature/VFS-1289-event-manager-for-one-client-v.3.0
41907e7 VFS-1289 Refactor events framework. Extend unit tests. Fix integration tests.
a52d053 Merge remote-tracking branch 'origin/develop' into feature/VFS-1235-operations-on-files-at-the-client
d606115 Merge pull request aws#93 in VFS/clproto from feature/VFS-1235-operations-on-files-at-the-client to develop
875ebb3 Merge remote-tracking branch 'origin/develop' into feature/VFS-1235-operations-on-files-at-the-client
1eac08d Merge remote-tracking branch 'origin/develop' into feature/VFS-1235-operations-on-files-at-the-client
5ef8fe0 VFS-1235 Implement PushListener.
164b577 Merge pull request aws#89 in VFS/clproto from feature/VFS-1223-implementation-of-macaroons-for to develop
4af31f8 VFS-1235 Implement truncate.
20b8d05 VFS-1235 Implement truncate.
993efc6 VFS-1235 Implement truncate.
b075ea2 VFS-1235 Implement read.
e5ffe9b VFS-1235 Introduce cache classes.
dcf3adb VFS-1223 Add a refreshing macaroons capability.
446bef1 VFS-1223 Add a refreshing macaroons capability.
4dbd2e5 Merge pull request aws#88 in VFS/clproto from feature/VFS-1217-optimization-of-development-environment to develop
4239d9d VFS-1217 Generate clproto erl files only if not yet generated.
f9d0890 Merge remote-tracking branch 'origin/feature/VFS-1223-implementation-of-macaroons-for_merge' into feature/VFS-1223-implementation-of-macaroons-for
d0fdb94 VFS-1217 Clear environment compilation flags.
49787dd Merge remote-tracking branch 'origin/develop' into feature/VFS-1217-optimization-of-development-environment
b3f0853 VFS-1223 Add a refreshing macaroons capability.
3c2855a VFS-1223 Add a refreshing macaroons capability.
968a835 VFS-1235 Change protocol to support file operations.
ba7a1b5 VFS-1235 Change protocol to support file operations.
a6247e7 VFS-1235 Change protocol to support file operations.
1b2d59c Merge commit '597c423bbe1ab1785a5c856c38b277b4bd6793bb' into feature/VFS-1235-operations-on-files-at-the-client
d69169c VFS-1235 Add protocol for operations on regular files.
055870f VFS-1217 Build messages NIF through CMake.
44e3dfe Merge pull request aws#87 in VFS/clproto from feature/VFS-1147-first-operations-on-directories to develop
3d6a3d3 VFS-1153 Fix handshake logic.
356c182 Merge commit 'f72777be3be31deba0be6061685167b4a6f4a446' into feature/VFS-1153-first-operations-on-directories
8db7fab VFS-1153 Add Rename and ChangeMode messages.
0d9f35f VFS-1153 Add Rename and ChangeMode messages.
e204df8 VFS-1153 Add Rename and ChangeMode messages.
ed31a3b Merge commit '44a307c1b92d6fa3e1c500d977dcc6cc868a2168' into bugfix/VFS-1160-fix-communicator-integration-tests
b974f01 VFS-1160 Fix unit tests.
c8554b2 Merge commit '4dc99eb2ade9497b73ef16b916010bb2f2c403e9' into bugfix/VFS-1160-fix-communicator-integration-tests
6513820 VFS-1160 Pull in erlang-tls.
305846f VFS-1160 Pull in erlang-tls.
77ad057 VFS-1153 Catch constructor exceptions in communication translator.
bba3d3e Merge commit '1ae96d4603f4459624d3020cd03f093404713d0f' into feature/VFS-1153-first-operations-on-directories
6d2e402 VFS-1153 Update clproto.
88e184d Merge branch 'feature/VFS-1161-reduce-dependencies-on-experimental' into feature/VFS-1153-first-operations-on-directories
cadf9b1 Merge commit 'e5c358514c60260f8a0b56fb9ad5eb0a91f13681' into feature/VFS-1161-reduce-dependencies-on-experimental
5a79af5 add ChangeMode and Rename messages
647b045 VFS-1147 fix ambiguous file entry
cb6d5f3 Merge remote-tracking branch 'origin/develop' into feature/VFS-1147-first-operations-on-directories
f06106b Merge pull request aws#86 in VFS/clproto from feature/VFS-1145-ssl2-integrated-with-oneprovider to develop
354be43 VFS-1147 Fix compilation.
c322a9b Merge commit '054e6f18025dc858eb15cfb2f4f6be67c2af0653' into feature/VFS-1153-first-operations-on-directories
3ab63b5 VFS-1147 Change FileChildren message structure.
68da8d5 Merge branch 'feature/VFS-1147-first-operations-on-directories_merge' of ssh://git.plgrid.pl:7999/vfs/clproto into feature/VFS-1147-first-operations-on-directories
4de7561 VFS-1153 Add new FUSE messages domain objects.
85b8d0e VFS-1153 Add new FUSE messages domain objects.
158ec3b VFS-1147 Add name to FileAttr message.
acdd6ee VFS-1153 Reformat helper files.
94c553f Merge commit '1c75eae2fb93d17e9fb4fcb571a4f8068c7e18ec' into feature/VFS-1153-first-operations-on-directories
2f770d5 VFS-1147 Change FileChildren message format.
61ab98b VFS-1147 Add UUID to file attr.
39844f5 VFS-1147 Using parent UUID for directory creation.
38e2cff Fix oneclient compilation on OS X.
b7b0939 Merge commit '2acc59538ffb708736554de8d56b17a1809a4212' into feature/VFS-1127-performance-test-framework-for-client
c5f4a1a Merge branch 'feature/VFS-1142-client-packages' of ssh://git.plgrid.pl:7999/vfs/oneclient into feature/VFS-1127-performance-test-framework-for-client
30da1e5 VFS-1142 Take glog from system.
fd62e27 VFS-1142 Move cmake scripts to cmake/ dir.
46b5639 VFS-1147 Add communication protocol between FUSE client and the server.
7766498 VFS-1145 Remove oneproxy messages.
534ceb6 VFS-1142 Add missing cmake dependencies.
3439428 Merge commit '1c56de6208ccb274c198f6dca20e28d44e4ff407' into feature/VFS-1127-performance-test-framework-for-client
1d5c47a Merge pull request aws#85 in VFS/clproto from feature/VFS-1129-packages-deb-and-rpm to develop
90a4037 Merge commit '85ead06cc1a22386d9534f6e53a2a7dbf7492991' into feature/VFS-1127-performance-test-framework-for-client
62ea25f VFS-1129 Revert gpb update, do not delete priv/vsn.git during clean.
007acd1 VFS-1129 Update gpb.
47e5289 Merge commit '908734e934b8fa3c007f4d814a43cb0f19ebe454' into feature/VFS-1127-performance-test-framework-for-client
c1f591b Merge commit '8004ab7405cc878574b030c964ccdccfea301706' into feature/VFS-1127-performance-test-framework-for-client
fefdeb3 Merge commit '61ab02e72781719e793a5a9c410096826f2c4b9f' into feature/VFS-1127-performance-test-framework-for-client
281c0f3 Merge pull request aws#84 in VFS/clproto from feature/VFS-1115-rpm-packages to develop
010fc07 VFS-1115 Update gpb.
8c38886 Merge commit 'f7841aacbba540583eefa18fea19957abb7f943a' into feature/VFS-1072-fuse-callback-mock
6d2523e Merge pull request aws#83 in VFS/clproto from feature/VFS-1111-communication-layer-unit-tests to develop
8820963 Merge remote-tracking branch 'origin/develop' into feature/VFS-1111-communication-layer-unit-tests
f2a7fb9 Merge commit 'dcc8030bc023ed90d8f6b2c8bbcc79bf3434e001' into feature/VFS-1072-fuse-callback-mock
4b1749d Merge branch 'develop' of ssh://git.plgrid.pl:7999/vfs/oneclient into feature/VFS-1072-fuse-callback-mock
8ab110b VFS-1111 Implement Translator layer tests.
e738d82 VFS-1110 Propagate errors on first connection in client.
40def9b Merge commit '450fcbafc1ad1c5bb018cc42defbab15d51d0021' into feature/VFS-1110-propagate-errors-on-first-oc-handshake
ae65b73 VFS-1072 Fix client compilation error.
7408c67 Merge commit '4e36a21b7fe71989db405f708099c45887e02dc1' into feature/VFS-1072-fuse-callback-mock
b0c0a2d VFS-1072 Implement unit tests for aggregators and streams.
9a0e805 Merge commit 'fd560a82a3bf1333bf0a2ffe07daf34076a44504' into feature/VFS-1072-fuse-callback-mock
9e6c458 VFS-1072 Add unit tests for events.
96409d9 VFS-1072 More asynchronous events.
3a59bc2 Merge commit '6eacd168e35c3a0cb8a9e2552ab5e1c23c603217' into feature/VFS-1093-improve-futures-in-communication
c2a64c9 Merge branch 'develop' of ssh://git.plgrid.pl:7999/vfs/oneclient into feature/VFS-1034-oc-protocol-integration-and-tests
8d93933 VFS-1072 Add handlers for server messages concerning events.
e388ef5 Merge commit '510d229ba5e5274dd810e71ba8333a0f08d13325' into feature/VFS-1072-fuse-callback-mock
bb2e0e2 Merge branch 'feature/VFS-1034-oc-protocol-integration-and-tests' of ssh://git.plgrid.pl:7999/vfs/oneclient into feature/VFS-1072-fuse-callback-mock
ddd9ae9 Merge branch 'develop' of ssh://git.plgrid.pl:7999/vfs/oneclient into feature/VFS-1072-fuse-callback-mock
920f916 Merge commit '07b7972cb15a1a77b7640da6b1ddca4ad8e5275a' into feature/VFS-1034-oc-protocol-integration-and-tests
a11937a Merge commit 'd93cb991c7f69cb22ce018321013c6753c31ba89' into feature/VFS-1056-several-improvements-to-docker-scripts
42d8e36 Merge commit '6179f299ff599d9d1a2efaf271655ad2afd68b6b' into feature/VFS-1034-oc-protocol-integration-and-tests
d36e0f4 Merge commit '356da66a3e2302de252d1944d416142596098fe1' into feature/VFS-1034-oc-protocol-integration-and-tests
38f669d Merge branch 'develop' of ssh://git.plgrid.pl:7999/vfs/oneclient into feature/VFS-1034-oc-protocol-integration-and-tests
c20cead Merge commit '3762404702239e1bbf8eb88e1025ec2b1501204e' into merge_helpers
8385906 Merge commit 'bc24de354ab4cf7a845480229c0536010f399b46' into feature/VFS-1016-new-messages-handling-with-streaming
1b807c3 Merge pull request aws#82 in VFS/clproto from feature/VFS-1098-dialyzer-works-for-gr to develop
d67ad39 VFS-1098 Apply recommended changes.
100ef2f Merge branch 'feature/VFS-1016-new-messages-handling-with-streaming' of ssh://git.plgrid.pl:7999/vfs/oneclient into feature/VFS-1034-oc-protocol-integration-and-tests
433c7cd Merge commit '3a8ce283460a415eeccadd039f781bbf4fab3e64' into feature/VFS-1016-new-messages-handling-with-streaming
36d56fe VFS-1098 Generating Erlang NIFs.
6268a5f VFS-1098 Add oneproxy messages.
d657d2e VFS-1098 Change Protocol Buffers compiler.
0b8a612 VFS-1098 Create rebar application.
1861cd4 Merge pull request aws#80 in VFS/clproto from feature/VFS-1016-new-messages-handling-with-streaming to develop
905419b Merge commit 'f50b65662ff4840c849b11bf677b22ff3ef25b81' into feature/VFS-1034-oc-protocol-integration-and-tests
e5f6435 VFS-1016 Add new communication stack to oneclient.
90fadd2 Merge commit 'bc4d705dafd1d6eb7cc79a4e14f1ab5ea60b500f' into feature/VFS-1016-new-messages-handling-with-streaming
d4ea68b Merge commit '5369641d1ca1b989f1d9594768f5fefae0566332' into feature/VFS-1016-new-messages-handling-with-streaming
ccd8e29 Merge commit '0af6986221cf900ce030273c87e6c0ef23ca4751' into feature/VFS-1016-new-messages-handling-with-streaming
bb9954e Merge remote-tracking branch 'origin/feature/VFS-1034-oc-protocol-integration' into feature/VFS-1016-new-messages-handling-with-streaming
2c3dbba VFS-1034 Merge develop.
a5acf7c Merge pull request aws#78 in VFS/clproto from VFS-1035-Add-CMakeLists-to-protocol to develop
690de64 Merge pull request aws#79 in VFS/clproto from feature/VFS-1037-op-communicator-performance-test to develop
3800374 VFS-1037 naming changes
d1ba29d VFS-1037 doc
292f02e VFS-1037 repair invalid imports
845b3b6 VFS-1037 protocol version messages added as oneof client/server message
c03a2a5 VFS-1037 rename ping_messages to diagnostic_messages,add 'GetProtocolVersion' message
b8393dd VFS-1037 rename ping_messages to diagnostic_messages,add 'GetProtocolVersion' message
9899db7 VFS-1037 doc update
7a1ea8f VFS-1016 Improve protocol.
684ad1b Merge pull request aws#77 in VFS/clproto from VFS-1035-Add-CMakeLists-to-protocol to feature/VFS-1034-oc-protocol-integration
4d96944 Merge commit 'e3e9754d912132968285e58286f3f5436c48600d' as 'helpers'
be6f29f VFS-1035 Rewrite CMakeLists to allow building helpers as subproject.
f53a2c5 VFS-1034 Fix protocol compilation.
803f77a VFS-1037 Data message
cafd2cc ping messages
c421abf Merge pull request aws#76 in VFS/clproto from feature/VFS-1009-op-new-protocol-handler to develop
33a8317 beautify protocol v2
4c8508a beautify protocol
8584c8a VFS-997 Add stream message and descriptions + refactoring.
4b27927 change type od message_id from uint64 to bytes
9423229 change handshake message
e63b893 certificate msg extended
5f3db6c remove header
6f2b815 remove HandshakeAcknowledgement
2d2761d typo fix
2e5237e new handshake messages
2ea50b8 VFS-997 Extend protocol messages.
cbe54db Merge branch 'feature/VFS-1009-op-new-protocol-handler' of ssh://git.plgrid.pl:7999/vfs/clproto into feature/VFS-1005-new-protocol-oc-op
2b37656 rename 'oneof' messages
0069f68 add new proto file aggregating server and client messages
cfb51b4 remove HandshakeRequest data
2b72803 VFS-997 Add communication messages.
5ecbf14 Merge pull request aws#75 in VFS/clproto from feature/VFS-1005-new-protocol-oc-op to develop
fcd7b8b VFS-1005 Apply recommended changes.
b73c8bd VFS-1005 Minor fix for ServerMessage.
27bde46 VFS-1005 Change wrapping message structure.
613c3a8 VFs-1005 Add partial message mechanism.
50e3537 VFS-1005 Fix Erlang compilation errors.
6260815 VFS-1005 New protocol first implementation.
4bf6ec3 Merge pull request aws#68 in VFS/clproto from feature/VFS-960-access-to-fiemaps to develop
cbdfa01 GetFileBlockMap change uuid to logical name
a61592d GetFileBlockMap and FileBlockMap messages
d5e2d40 Merge pull request aws#67 in VFS/clproto from feature/VFS-936-async-update-for-file-attributes to develop
c84f2f9 VFS-936 add uuid field to file attributes
6607496 Merge pull request aws#66 in VFS/clproto from feature/VFS-931-fsmap-integration-in-fuse-client to develop
7d8a5eb Merge branch 'develop' of ssh://git.plgrid.pl:7999/vfs/clproto into feature/VFS-931-fsmap-integration-in-fuse-client
5d9b1b7 Merge pull request aws#65 in VFS/clproto from feature/VFS-932-block-info-in-events to develop
924cd10 VFS-931 Update BlocksAvailable message.
85b835c VFS-931 Add UpdateFileBlockMap message.
7e352e4 VFS-932 Change event message.
d30494b VFS-932 Change event message.
6df0c5b VFS-932 Change event message.
b1dbeec VFS-932 Add block properties to event message.
8f9daaa Merge pull request aws#64 in VFS/clproto from feature/VFS-921-rtransfer-goes-to-fslogic to develop
8cffa61 remove relative truncate
aae8331 add size_relative flag to FileTruncated message
a3614af typo fix
b129904 FileTruncated message
527ce4e FileBlockModified message
97fb9d7 SynchronizeFileBlock message
fbf1457 Merge pull request aws#59 in VFS/clproto from feature/VFS-888-map-files-to-blocks-for-fuse-and to develop
9e59d72 Merge remote-tracking branch 'origin/develop' into feature/VFS-888-map-files-to-blocks-for-fuse-and
68c7f87 VFS-888 Set 'blocks' as a repeated field.
eec028d Merge pull request aws#58 in VFS/veilprotocol from feature/VFS-858-new-cdmi-features-user-requirements to develop
4ecf392 VFS-888 Change identification fields of RequestFileBlock.
606de6b VFS-888 Add block-related messages and message fields.
96e3bfa Merge branch 'develop' into feature/VFS-858-new-cdmi-features-user-requirements
320d88c add acl flag
a8bc820 Merge pull request aws#57 in VFS/veilprotocol from feature/VFS-837-veil-to-onedata to develop
98fd52a VFS-837 Final renaming.
1351802 Merge pull request aws#56 in VFS/veilprotocol from feature/VFS-837-veil-to-onedata to develop
8fec391 VFS-837 Make onedata start with an uppercase letter.
d77f98f VFS-837 Refactor readme.
d7ea703 VFS-837 Rename namespace.
0a96244 VFS-837 Change from 'veil' to 'onedata'.
6751fe1 children count messages
21b6448 new acl messages
b7ad0a7 Merge pull request aws#54 in VFS/veilprotocol from feature/VFS-830-dokladne-przejrzenie-dokumentacji to develop
947a614 Merge branch 'develop' into feature/VFS-830-dokladne-przejrzenie-dokumentacji
cd83847 turn back develop changes
6ffbe83 Merge pull request aws#53 in VFS/veilprotocol from feature/VFS-828-zmiana-sposobu-uwierzytelnienia-tokenem to develop
2c2fe29 Merge pull request aws#50 in VFS/veilprotocol from feature/VFS-829-move-between-providers to develop
c1958c5 Merge pull request aws#51 in VFS/veilprotocol from master to develop
bbbbbaa VFS-828 Remove identity field in HandshakeRequest.
d6c8b3a VFS-829: fix typo
52aeab3 revert newest develop changes
b8a16f8 extended Attrs api
f1a5e5c Merge pull request aws#49 in VFS/veilprotocol from feature/VFS-829-move-between-providers to develop
278cec8 Merge pull request aws#48 in VFS/veilprotocol from feature/VFS-820-zastapic-obecne-checki-uprawnien to develop
2c6199a Merge pull request aws#47 in VFS/veilprotocol from feature/VFS-781-uwierzytelnienie-klienta-przy-pomocy to develop
ab8da14 VFS-829: fix compile
b0a4b59 VFS-829: fix compile
d1bc237 VFS-829: add DirEntry to protocol
57ef0e7 VFS-829: add DirEntry to protocol
61faf51 VFS-820, change message name
a8472c1 Merge branch 'feature/VFS-781-uwierzytelnienie-klienta-przy-pomocy' of ssh://git.plgrid.pl:7999/vfs/veilprotocol into feature/VFS-820-zastapic-obecne-checki-uprawnien
9cb05c4 VFS-820, add CheckPerms message
bdf9d21 VFS-781 Fix protocol.
2202298 Merge remote-tracking branch 'origin/develop' into feature/VFS-781-uwierzytelnienie-klienta-przy-pomocy
e0922ca Merge pull request aws#46 in VFS/veilprotocol from feature/VFS-784-obsuga-cdmi_capabilities to develop
4cd3381 VFS-781 Add an identity field for handshake request.
9440a98 GetFileUuid and FileUuid messages added
8dcf62c Merge pull request aws#45 in VFS/veilprotocol from feature/VFS-754-dostep-zdalny-do-innego-providera to develop
8590cc1 VFS-754: add cluster proxy getattr
47b8904 VFS-754: add cluster proxy getattr
0de5be7 Merge remote-tracking branch 'origin/develop' into feature/VFS-754-dostep-zdalny-do-innego-providera
cfbaf77 VFS-754: add message decoder to answer message
ef27ce5 Merge pull request aws#40 in VFS/veilprotocol from release-1.0 to develop
a03f86a Merge pull request aws#39 in VFS/veilprotocol from release-1.0 to master
939895c Merge pull request aws#38 in VFS/veilprotocol from bugfix/VFS-751-release-1.5-wypuszczony to release-1.0
e4dc26e Release notes updatd
8670fb4 Merge pull request aws#37 in VFS/veilprotocol from bugfix/VFS-751-release-1.5-wypuszczony to release-1.0
b77373b Release notes added
f1355db Merge pull request aws#36 in VFS/veilprotocol from feature/VFS-749-clusterproxy-uzywany-gdy-brak-accessu to develop
4dc1ed0 VFS-754: add global user id to cluster message
84322ed VFS-754: add ProviderMsg
f5394d9 VFS-754: add access tokent to cluster message
4d44532 Merge branch 'feature/VFS-749-clusterproxy-uzywany-gdy-brak-accessu' into feature/VFS-754-dostep-zdalny-do-innego-providera
944861f VFS-754: make space_id optional
0f61799 VFS-749: add ClusterProxy context info
d17ccb8 VFS-754: add space_id to RFM
76c5dff Merge pull request aws#35 in VFS/veilprotocol from feature/gui_release_to_develop to develop
b41dd32 Merge branch 'release-1.0' into feature/gui_release_to_develop
41d9a76 Merge pull request aws#34 in VFS/veilprotocol from feature/VFS-731-wysyanie-poziomu-uprawnien-pliku to release-1.0
184b766 add mode to CreateFile message
25188df Merge pull request aws#33 in VFS/veilprotocol from release-1.0 to develop
37b1a8d Merge pull request aws#32 in VFS/veilprotocol from bugfix/VFS-592-dostep-do-pliku-niezgodny-z-ustawionym to release-1.0
68962ce default open_mode msg changed from "none" to ""
fe42fe9 Merge branch 'release-1.0' into bugfix/VFS-592-dostep-do-pliku-niezgodny-z-ustawionym
74f49cb Merge pull request aws#31 in VFS/veilprotocol from bugfix/VFS-608-niemozliwosc-zarejestrowania-DN to release-1.0
681cdfe open_mode optional parameter added to GetFileLocation msg
e5424af VFS-608, fix naming
194e6d0 VFS-608, add fields to proto to handle cert verification
d1395fb VFS-608, add error description field to Answer record
a459825 Merge pull request aws#30 in VFS/veilprotocol from VFS-555 to develop
5677ce6 [VFS-555] typo fix
0862a00 [VFS-555] EventStreamConfig extended
e420048 Merge pull request aws#27 in VFS/veilprotocol from VFS-489 to master
ee7b249 VFS-489 Message fix.
2263e19 VFS-489 Make some message fields required.
af6e6b8 VFS-489 Create more specific storage test messages.
e86b601 VFS-489 Direct IO storage message refactored.
ceaedf2 VFS-489 Direct IO storage message added.
ec8208e VFS-489 Storage test messages refactored.
fdf35b6 VFS-489 Storage test messages added.
4db85aa Merge pull request aws#26 in VFS/veilprotocol from VFS-482 to master
b07e7bd Merge branch 'VFS-482' of ssh://git.plgrid.pl:7999/vfs/veilprotocol into VFS-482
abc677e Generic event message added
f517338 Merge pull request aws#24 in VFS/veilprotocol from VFS-443-centralny-logger-dla-clientow to master
81fd5c1 Merge pull request aws#25 in VFS/veilprotocol from VFS-441 to master
680c66c [VFS-441] comment added
c71b9ea VFS-443 Add logging protocol.
ecae432 [VFS-441] EventTransformer added
cf0ed2e Merge pull request aws#23 in VFS/veilprotocol from VFS-441 to master
26e569e [VFS-441] pushmessage message removed
578c1e9 [VFS-441] Comments for EventStreamConfig
dd4be71 [VFS-441] eventaggregatorconfig message extended
37c9a41 [VFS-441] client fetch event producer configuration on startup
06caeb6 [VFS-441] protocol buffer messages for events improved
ce371ef [VFS-413] messages for events subscription added
9d289fd Merge pull request aws#22 in VFS/veilprotocol from VFS-442 to master
e0b9ed9 VFS-442 Add answer field to StatFSInfo message.
b001a78 Merge pull request aws#21 in VFS/veilprotocol from VFS-442 to master
aef57ff VFS-442 Merge veilprotocol messages.
7e36203 VFS-442 GetFilesSize and FilesSizeInfo messages added.
0aa0848 VFS-442 GetQuota and QuotaInfo messages added.
1e45be5 Merge pull request aws#20 in VFS/veilprotocol from VFS-435-problem-z-wyswietlaniem-duzych-plikow to master
32aaf5e another changes in size type from int32 to int64
45b786e size type changed from int32 to int64
87ac2f6 Merge pull request aws#19 in VFS/veilprotocol from VFS-240 to master
995da9b [VFS-240] Message CreateFileAck changed
66c68e3 [VFS-240] CreateFileAck message added
8548237 Merge pull request aws#18 in VFS/veilprotocol from VFS-356 to master
8a2eb34 ChangePermsAtStorage message added
ec4d3e4 Merge pull request aws#17 in VFS/veilprotocol from VFS-211 to master
1402c88 VFS-211 Links field to files attribute added.
e808f04 Merge pull request aws#16 in VFS/veilprotocol from VFS-264 to master
58d5334 Merge pull request aws#15 in VFS/veilprotocol from VFS-252 to master
d11ae1d Merge pull request aws#13 in VFS/veilprotocol from VFS-260 to master
2645d9b Merge pull request aws#12 in VFS/veilprotocol from VFS-167 to master
34bba96 Merge pull request aws#11 in VFS/veilprotocol from VFS-162 to master
5f631d2 Merge pull request aws#10 in VFS/veilprotocol from VFS-159 to master
b77991a Merge pull request aws#9 in VFS/veilprotocol from VFS-162 to master
b1578ab Merge pull request aws#8 in VFS/veilprotocol from VFS-156 to master
41bc0be Merge pull request aws#7 in VFS/veilprotocol from VFS-127 to master
4781952 Merge pull request aws#6 in VFS/veilprotocol from VFS-113 to master
11d5d1a Merge pull request aws#5 in VFS/veilprotocol from VFS-101 to master
72bf94c fuse messages updated
1956dbb Merge pull request aws#4 from VFS-80,85 to master
9b65f25 FileChildren fix
1ff7d28 Merge pull request aws#3 from VFS-80 to master
cb54b30 decoder fields corrected
4048cfb Merge branch 'VFS-80' of ssh://git.plgrid.pl:7999/VFS/veilprotocol into VFS-80
b9a67a5 Added decoder_name and messages for directory creation and location validity info
9f660cf Added decoder_name and messages for directory creation and location validity info
1b7b40b Merge pull request aws#1 from VFS-80 to master
295be28 fuse messages
e85f681 fuse messages
6dcc3aa Initial Commit

git-subtree-dir: helpers
git-subtree-split: 6280b36aa0a8fc1277758cd33077ac0b35df1398
JonathanHenson pushed a commit that referenced this issue Jul 13, 2016
Unril added a commit to Unril/aws-sdk-cpp that referenced this issue Feb 4, 2020
Looks like clang does some strange optimizations after which this code becomes invalid under multithreaded access.

Here what adders sanitizer says when trying to download a file:

```
=================================================================
==2219==ERROR: AddressSanitizer: heap-use-after-free on address 0x606000010ae0 at pc 0x000007cfac57 bp 0x7f4f0b4f4290 sp 0x7f4f0b4f4288
READ of size 4 at 0x606000010ae0 thread T6
    #0 0x7cfac56 in std::__y1::less<int>::operator()(int const&, int const&) const /contrib/libs/cxxsupp/libcxx/include/__functional_base:55:17
    aws#1 0x7cfac56 in std::__y1::__map_value_compare<int, std::__y1::__value_type<int, std::__y1::basic_string<char, std::__y1::char_traits<char>, std::__y1::allocator<char> > >, std::__y1::less<int>, true>::operator()(std::__y1::__value_type<int, std::__y1::basic_string<char, std::__y1::char_traits<char>, std::__y1::allocator<char> > > const&, int const&) const /contrib/libs/cxxsupp/libcxx/include/map:516
    aws#2 0x7cfac56 in std::__y1::__tree_iterator<std::__y1::__value_type<int, std::__y1::basic_string<char, std::__y1::char_traits<char>, std::__y1::allocator<char> > >, std::__y1::__tree_node<std::__y1::__value_type<int, std::__y1::basic_string<char, std::__y1::char_traits<char>, std::__y1::allocator<char> > >, void*>*, long> std::__y1::__tree<std::__y1::__value_type<int, std::__y1::basic_string<char, std::__y1::char_traits<char>, std::__y1::allocator<char> > >, std::__y1::__map_value_compare<int, std::__y1::__value_type<int, std::__y1::basic_string<char, std::__y1::char_traits<char>, std::__y1::allocator<char> > >, std::__y1::less<int>, true>, std::__y1::allocator<std::__y1::__value_type<int, std::__y1::basic_string<char, std::__y1::char_traits<char>, std::__y1::allocator<char> > > > >::__lower_bound<int>(int const&, std::__y1::__tree_node<std::__y1::__value_type<int, std::__y1::basic_string<char, std::__y1::char_traits<char>, std::__y1::allocator<char> > >, void*>*, std::__y1::__tree_end_node<std::__y1::__tree_node_base<void*>*>*) /contrib/libs/cxxsupp/libcxx/include/__tree:2676
    aws#3 0x7cfac56 in std::__y1::__tree_iterator<std::__y1::__value_type<int, std::__y1::basic_string<char, std::__y1::char_traits<char>, std::__y1::allocator<char> > >, std::__y1::__tree_node<std::__y1::__value_type<int, std::__y1::basic_string<char, std::__y1::char_traits<char>, std::__y1::allocator<char> > >, void*>*, long> std::__y1::__tree<std::__y1::__value_type<int, std::__y1::basic_string<char, std::__y1::char_traits<char>, std::__y1::allocator<char> > >, std::__y1::__map_value_compare<int, std::__y1::__value_type<int, std::__y1::basic_string<char, std::__y1::char_traits<char>, std::__y1::allocator<char> > >, std::__y1::less<int>, true>, std::__y1::allocator<std::__y1::__value_type<int, std::__y1::basic_string<char, std::__y1::char_traits<char>, std::__y1::allocator<char> > > > >::find<int>(int const&) /contrib/libs/cxxsupp/libcxx/include/__tree:2605
    aws#4 0x7cfac56 in std::__y1::map<int, std::__y1::basic_string<char, std::__y1::char_traits<char>, std::__y1::allocator<char> >, std::__y1::less<int>, std::__y1::allocator<std::__y1::pair<int const, std::__y1::basic_string<char, std::__y1::char_traits<char>, std::__y1::allocator<char> > > > >::find(int const&) /contrib/libs/cxxsupp/libcxx/include/map:1378
    aws#5 0x7cfac56 in Aws::Monitoring::GetHttpClientMetricNameByType(Aws::Monitoring::HttpClientMetricsType) /contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/source/monitoring/HttpClientMetrics.cpp:72
    aws#6 0x7cf33b0 in Aws::Http::CurlHttpClient::MakeRequestInternal(Aws::Http::HttpRequest&, std::__y1::shared_ptr<Aws::Http::Standard::StandardHttpResponse>&, Aws::Utils::RateLimits::RateLimiterInterface*, Aws::Utils::RateLimits::RateLimiterInterface*) const /contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/source/http/curl/CurlHttpClient.cpp:495:38
    aws#7 0x7cf8792 in Aws::Http::CurlHttpClient::MakeRequest(std::__y1::shared_ptr<Aws::Http::HttpRequest> const&, Aws::Utils::RateLimits::RateLimiterInterface*, Aws::Utils::RateLimits::RateLimiterInterface*) const /contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/source/http/curl/CurlHttpClient.cpp:545:5
    aws#8 0x7d61be2 in Aws::Client::AWSClient::AttemptOneRequest(std::__y1::shared_ptr<Aws::Http::HttpRequest> const&, Aws::AmazonWebServiceRequest const&, char const*) const /contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/source/client/AWSClient.cpp:304:23
    aws#9 0x7d5cf37 in Aws::Client::AWSClient::AttemptExhaustively(Aws::Http::URI const&, Aws::AmazonWebServiceRequest const&, Aws::Http::HttpMethod, char const*) const /contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/source/client/AWSClient.cpp:183:19
    aws#10 0x7d6b4c4 in Aws::Client::AWSClient::MakeRequestWithUnparsedResponse(Aws::Http::URI const&, Aws::AmazonWebServiceRequest const&, Aws::Http::HttpMethod, char const*) const /contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/source/client/AWSClient.cpp:360:47
    aws#11 0x797332b in Aws::S3::S3Client::GetObject(Aws::S3::Model::GetObjectRequest const&) const /contrib/libs/aws-sdk-cpp/aws-cpp-sdk-s3/source/S3Client.cpp:1820:27
    aws#12 0x7e6fc10 in Aws::Transfer::TransferManager::DoSinglePartDownload(std::__y1::shared_ptr<Aws::Transfer::TransferHandle> const&) /contrib/libs/aws-sdk-cpp/aws-cpp-sdk-transfer/source/transfer/TransferManager.cpp:668:64
    aws#13 0x7e7436c in Aws::Transfer::TransferManager::DoDownload(std::__y1::shared_ptr<Aws::Transfer::TransferHandle> const&) /contrib/libs/aws-sdk-cpp/aws-cpp-sdk-transfer/source/transfer/TransferManager.cpp:777:17
    aws#14 0x7d2ed80 in std::__y1::__function::__value_func<void ()>::operator()() const /contrib/libs/cxxsupp/libcxx/include/functional:1860:16
    aws#15 0x7d2ed80 in std::__y1::function<void ()>::operator()() const /contrib/libs/cxxsupp/libcxx/include/functional:2426
    aws#16 0x7d2ed80 in Aws::Utils::Threading::ThreadTask::MainTaskRunner() /contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/source/utils/threading/ThreadTask.cpp:41
    aws#17 0x7d2f287 in decltype(*(std::__y1::forward<Aws::Utils::Threading::ThreadTask*&>(fp0)).*fp()) std::__y1::__invoke<void (Aws::Utils::Threading::ThreadTask::*&)(), Aws::Utils::Threading::ThreadTask*&, void>(void (Aws::Utils::Threading::ThreadTask::*&)(), Aws::Utils::Threading::ThreadTask*&) /contrib/libs/cxxsupp/libcxx/include/type_traits:3559:1
    aws#18 0x7d2f287 in std::__y1::__bind_return<void (Aws::Utils::Threading::ThreadTask::*)(), std::__y1::tuple<Aws::Utils::Threading::ThreadTask*>, std::__y1::tuple<>, __is_valid_bind_return<void (Aws::Utils::Threading::ThreadTask::*)(), std::__y1::tuple<Aws::Utils::Threading::ThreadTask*>, std::__y1::tuple<> >::value>::type std::__y1::__apply_functor<void (Aws::Utils::Threading::ThreadTask::*)(), std::__y1::tuple<Aws::Utils::Threading::ThreadTask*>, 0ul, std::__y1::tuple<> >(void (Aws::Utils::Threading::ThreadTask::*&)(), std::__y1::tuple<Aws::Utils::Threading::ThreadTask*>&, std::__y1::__tuple_indices<0ul>, std::__y1::tuple<>&&) /contrib/libs/cxxsupp/libcxx/include/functional:2732
    aws#19 0x7d2f287 in std::__y1::__bind_return<void (Aws::Utils::Threading::ThreadTask::*)(), std::__y1::tuple<Aws::Utils::Threading::ThreadTask*>, std::__y1::tuple<>, __is_valid_bind_return<void (Aws::Utils::Threading::ThreadTask::*)(), std::__y1::tuple<Aws::Utils::Threading::ThreadTask*>, std::__y1::tuple<> >::value>::type std::__y1::__bind<void (Aws::Utils::Threading::ThreadTask::*)(), Aws::Utils::Threading::ThreadTask*>::operator()<>() /contrib/libs/cxxsupp/libcxx/include/functional:2770
    aws#20 0x7d2f287 in decltype(std::__y1::forward<std::__y1::__bind<void (Aws::Utils::Threading::ThreadTask::*)(), Aws::Utils::Threading::ThreadTask*> >(fp)()) std::__y1::__invoke<std::__y1::__bind<void (Aws::Utils::Threading::ThreadTask::*)(), Aws::Utils::Threading::ThreadTask*> >(std::__y1::__bind<void (Aws::Utils::Threading::ThreadTask::*)(), Aws::Utils::Threading::ThreadTask*>&&) /contrib/libs/cxxsupp/libcxx/include/type_traits:3618
    aws#21 0x7d2f287 in void std::__y1::__thread_execute<std::__y1::unique_ptr<std::__y1::__thread_struct, std::__y1::default_delete<std::__y1::__thread_struct> >, std::__y1::__bind<void (Aws::Utils::Threading::ThreadTask::*)(), Aws::Utils::Threading::ThreadTask*> >(std::__y1::tuple<std::__y1::unique_ptr<std::__y1::__thread_struct, std::__y1::default_delete<std::__y1::__thread_struct> >, std::__y1::__bind<void (Aws::Utils::Threading::ThreadTask::*)(), Aws::Utils::Threading::ThreadTask*> >&, std::__y1::__tuple_indices<>) /contrib/libs/cxxsupp/libcxx/include/thread:343
    aws#22 0x7d2f287 in void* std::__y1::__thread_proxy<std::__y1::tuple<std::__y1::unique_ptr<std::__y1::__thread_struct, std::__y1::default_delete<std::__y1::__thread_struct> >, std::__y1::__bind<void (Aws::Utils::Threading::ThreadTask::*)(), Aws::Utils::Threading::ThreadTask*> > >(void*) /contrib/libs/cxxsupp/libcxx/include/thread:353
    aws#23 0x7f4f117f4668 in start_thread (/lib/x86_64-linux-gnu/libpthread.so.0+0x9668)
    aws#24 0x7f4f1171c322 in clone /build/glibc-4WA41p/glibc-2.30/misc/../sysdeps/unix/sysv/linux/x86_64/clone.S:95
0x606000010ae0 is located 32 bytes inside of 64-byte region [0x606000010ac0,0x606000010b00)
freed by thread T0 here:
    #0 0x247bd32 in operator delete(void*) /place/sandbox-data/tasks/5/1/433792615/build/last/clang/src/projects/compiler-rt/lib/asan/asan_new_delete.cc:167:3
    aws#1 0x7f4f11643ba6 in __run_exit_handlers /build/glibc-4WA41p/glibc-2.30/stdlib/exit.c:108:8
previously allocated by th
...
cxx/include/functional:1860:16
    aws#21 0x28f9d72 in std::__y1::function<void ()>::operator()() const /contrib/libs/cxxsupp/libcxx/include/functional:2426
    aws#22 0x28f9d72 in TColoredProcessor::Run(std::__y1::function<void ()>, TBasicString<char, TCharTraits<char> > const&, char const*, bool) /library/unittest/utmain.cpp:475
    aws#23 0x28c18ce in NUnitTest::TTestBase::Run(std::__y1::function<void ()>, TBasicString<char, TCharTraits<char> >, char const*, bool) /library/unittest/registar.cpp:375:18
    aws#24 0x24bad72 in maps::factory::processing::tests::NTestSuitecloud_optimize_tasks_should::TCurrentTest::Execute() /maps/factory/processing/cloud_optimize/tests/tests.cpp:25:1
    aws#25 0x28c3747 in NUnitTest::TTestFactory::Execute() /library/unittest/registar.cpp:484:19
    aws#26 0x28f18ec in NUnitTest::RunMain(int, char**) /library/unittest/utmain.cpp:755:44
    aws#27 0x7f4f116211e2 in __libc_start_main /build/glibc-4WA41p/glibc-2.30/csu/../csu/libc-start.c:308:16
Thread T4 created by T0 here:
    #0 0x243478d in __interceptor_pthread_create /place/sandbox-data/tasks/5/1/433792615/build/last/clang/src/projects/compiler-rt/lib/asan/asan_interceptors.cc:210:3
    aws#1 0x7d2f0df in std::__y1::__libcpp_thread_create(unsigned long*, void* (*)(void*), void*) /contrib/libs/cxxsupp/libcxx/include/__threading_support:331:10
    aws#2 0x7d2f0df in std::__y1::thread::thread<std::__y1::__bind<void (Aws::Utils::Threading::ThreadTask::*)(), Aws::Utils::Threading::ThreadTask*>, void>(std::__y1::__bind<void (Aws::Utils::Threading::ThreadTask::*)(), Aws::Utils::Threading::ThreadTask*>&&) /contrib/libs/cxxsupp/libcxx/include/thread:369
    aws#3 0x7d2ebd6 in Aws::Utils::Threading::ThreadTask::ThreadTask(Aws::Utils::Threading::PooledThreadExecutor&) /contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/source/utils/threading/ThreadTask.cpp:22:98
    aws#4 0x7d292d3 in Aws::Utils::Threading::ThreadTask* Aws::New<Aws::Utils::Threading::ThreadTask, Aws::Utils::Threading::PooledThreadExecutor&>(char const*, Aws::Utils::Threading::PooledThreadExecutor&) /contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/include/aws/core/utils/memory/AWSMemory.h:72:48
    aws#5 0x7d292d3 in Aws::Utils::Threading::PooledThreadExecutor::PooledThreadExecutor(unsigned long, Aws::Utils::Threading::OverflowPolicy) /contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/source/utils/threading/Executor.cpp:91
    aws#6 0x7eaaf35 in std::__y1::__compressed_pair_elem<Aws::Utils::Threading::PooledThreadExecutor, 1, false>::__compressed_pair_elem<unsigned long&, 0ul>(std::__y1::piecewise_construct_t, std::__y1::tuple<unsigned long&>, std::__y1::__tuple_indices<0ul>) /contrib/libs/cxxsupp/libcxx/include/memory:2160:9
    aws#7 0x7eaaf35 in std::__y1::__compressed_pair<std::__y1::allocator<Aws::Utils::Threading::PooledThreadExecutor>, Aws::Utils::Threading::PooledThreadExecutor>::__compressed_pair<std::__y1::allocator<Aws::Utils::Threading::PooledThreadExecutor>&, unsigned long&>(std::__y1::piecewise_construct_t, std::__y1::tuple<std::__y1::allocator<Aws::Utils::Threading::PooledThreadExecutor>&>, std::__y1::tuple<unsigned long&>) /contrib/libs/cxxsupp/libcxx/include/memory:2264
    aws#8 0x7eaaf35 in std::__y1::__shared_ptr_emplace<Aws::Utils::Threading::PooledThreadExecutor, std::__y1::allocator<Aws::Utils::Threading::PooledThreadExecutor> >::__shared_ptr_emplace<unsigned long&>(std::__y1::allocator<Aws::Utils::Threading::PooledThreadExecutor>, unsigned long&) /contrib/libs/cxxsupp/libcxx/include/memory:3684
    aws#9 0x7eaaf35 in std::__y1::shared_ptr<Aws::Utils::Threading::PooledThreadExecutor> std::__y1::shared_ptr<Aws::Utils::Threading::PooledThreadExecutor>::make_shared<unsigned long&>(unsigned long&) /contrib/libs/cxxsupp/libcxx/include/memory:4343
    aws#10 0x7eaaf35 in std::__y1::enable_if<!(is_array<Aws::Utils::Threading::PooledThreadExecutor>::value), std::__y1::shared_ptr<Aws::Utils::Threading::PooledThreadExecutor> >::type std::__y1::make_shared<Aws::Utils::Threading::PooledThreadExecutor, unsigned long&>(unsigned long&) /contrib/libs/cxxsupp/libcxx/include/memory:4722
SUMMARY: AddressSanitizer: heap-use-after-free /contrib/libs/cxxsupp/libcxx/include/__functional_base:55:17 in std::__y1::less<int>::operator()(int const&, int const&) const
Shadow bytes around the buggy address:
  0x0c0c7fffa100: fa fa fa fa fd fd fd fd fd fd fd fd fa fa fa fa
  0x0c0c7fffa110: fd fd fd fd fd fd fd fd fa fa fa fa fd fd fd fd
  0x0c0c7fffa120: fd fd fd fd fa fa fa fa fd fd fd fd fd fd fd fd
  0x0c0c7fffa130: fa fa fa fa fd fd fd fd fd fd fd fd fa fa fa fa
  0x0c0c7fffa140: fd fd fd fd fd fd fd fd fa fa fa fa fd fd fd fd
=>0x0c0c7fffa150: fd fd fd fd fa fa fa fa fd fd fd fd[fd]fd fd fd
  0x0c0c7fffa160: fa fa fa fa fd fd fd fd fd fd fd fd fa fa fa fa
  0x0c0c7fffa170: fd fd fd fd fd fd fd fd fa fa fa fa fd fd fd fd
  0x0c0c7fffa180: fd fd fd fd fa fa fa fa fd fd fd fd fd fd fd fd
  0x0c0c7fffa190: fa fa fa fa fd fd fd fd fd fd fd fd fa fa fa fa
  0x0c0c7fffa1a0: fd fd fd fd fd fd fd fd fa fa fa fa fd fd fd fd
Shadow byte legend (one shadow byte represents 8 application bytes):
  Addressable:           00
  Partially addressable: 01 02 03 04 05 06 07 
  Heap left redzone:       fa
  Freed heap region:       fd
  Stack left redzone:      f1
  Stack mid redzone:       f2
  Stack right redzone:     f3
  Stack after return:      f5
  Stack use after scope:   f8
  Global redzone:          f9
  Global init order:       f6
  Poisoned by user:        f7
  Container overflow:      fc
  Array cookie:            ac
  Intra object redzone:    bb
  ASan internal:           fe
  Left alloca redzone:     ca
  Right alloca redzone:    cb
  Shadow gap:              cc
```

There is no errors after this fix.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants