changeset 456:511efa5c84dd

fix
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 04 Jul 2013 15:53:46 +0200
parents 238a0c99ced2
children 997282a61ff8
files OrthancCppClient/HttpClient.cpp
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/OrthancCppClient/HttpClient.cpp	Thu Jul 04 15:25:15 2013 +0200
+++ b/OrthancCppClient/HttpClient.cpp	Thu Jul 04 15:53:46 2013 +0200
@@ -92,6 +92,11 @@
     CheckCode(curl_easy_setopt(pimpl_->curl_, CURLOPT_SSL_VERIFYPEER, 0)); 
 #endif
 
+    // This fixes the "longjmp causes uninitialized stack frame" crash
+    // that happens on modern Linux versions.
+    // http://stackoverflow.com/questions/9191668/error-longjmp-causes-uninitialized-stack-frame
+    CheckCode(curl_easy_setopt(pimpl_->curl_, CURLOPT_NOSIGNAL, 1));
+
     url_ = "";
     method_ = Orthanc_HttpMethod_Get;
     lastStatus_ = Orthanc_HttpStatus_200_Ok;