Git Product home page Git Product logo

Comments (27)

JonathanHenson avatar JonathanHenson commented on June 12, 2024

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?

from aws-sdk-cpp.

eugene345 avatar eugene345 commented on June 12, 2024

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?

from aws-sdk-cpp.

JonathanHenson avatar JonathanHenson commented on June 12, 2024

Good point. I'll try and see if I can reproduce the problem today.
On Oct 1, 2015 2:10 AM, "eugene345" [email protected] 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).

from aws-sdk-cpp.

JonathanHenson avatar JonathanHenson commented on June 12, 2024

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

valgrind --tool=memcheck and upload the result?

from aws-sdk-cpp.

eugene345 avatar eugene345 commented on June 12, 2024

valgrind --tool=memcheck

from aws-sdk-cpp.

JonathanHenson avatar JonathanHenson commented on June 12, 2024

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.

from aws-sdk-cpp.

eugene345 avatar eugene345 commented on June 12, 2024

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

from aws-sdk-cpp.

JonathanHenson avatar JonathanHenson commented on June 12, 2024

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.

from aws-sdk-cpp.

JonathanHenson avatar JonathanHenson commented on June 12, 2024

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());

from aws-sdk-cpp.

eugene345 avatar eugene345 commented on June 12, 2024

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

from aws-sdk-cpp.

JonathanHenson avatar JonathanHenson commented on June 12, 2024

ah! yes you can. Good call.

from aws-sdk-cpp.

eugene345 avatar eugene345 commented on June 12, 2024

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

from aws-sdk-cpp.

JonathanHenson avatar JonathanHenson commented on June 12, 2024

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

from aws-sdk-cpp.

eugene345 avatar eugene345 commented on June 12, 2024

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

from aws-sdk-cpp.

JonathanHenson avatar JonathanHenson commented on June 12, 2024

thanks.

from aws-sdk-cpp.

JonathanHenson avatar JonathanHenson commented on June 12, 2024

Which libcurl-dev variation are you using on your Ubuntu machine?
On Oct 1, 2015 2:19 PM, "eugene345" [email protected] 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).

from aws-sdk-cpp.

eugene345 avatar eugene345 commented on June 12, 2024

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

from aws-sdk-cpp.

JonathanHenson avatar JonathanHenson commented on June 12, 2024

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;
}

from aws-sdk-cpp.

eugene345 avatar eugene345 commented on June 12, 2024

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.

from aws-sdk-cpp.

JonathanHenson avatar JonathanHenson commented on June 12, 2024

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" [email protected] 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).

from aws-sdk-cpp.

eugene345 avatar eugene345 commented on June 12, 2024

Sorry, yes, I mean release build works fine.

from aws-sdk-cpp.

JonathanHenson avatar JonathanHenson commented on June 12, 2024

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" [email protected] wrote:

Sorry, yes, I mean release build works fine.


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

from aws-sdk-cpp.

eugene345 avatar eugene345 commented on June 12, 2024

int - 4 bytes
long - 8 bytes

from aws-sdk-cpp.

JonathanHenson avatar JonathanHenson commented on June 12, 2024

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" [email protected] wrote:

int - 4 bytes
long - 8 bytes


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

from aws-sdk-cpp.

eugene345 avatar eugene345 commented on June 12, 2024

Thank you too!

from aws-sdk-cpp.

JonathanHenson avatar JonathanHenson commented on June 12, 2024

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?

from aws-sdk-cpp.

eugene345 avatar eugene345 commented on June 12, 2024

Yes, the bug is fixed now.

from aws-sdk-cpp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.