microsoft / cpprestsdk

The C++ REST SDK is a Microsoft project for cloud-based client-server communication in native code using a modern asynchronous C++ API design. This project aims to help C++ developers connect to and interact with services.
Other
8.01k stars 1.66k forks source link

Running a sample program built in ubuntu 18.04 crashes in 20.04 #1642

Open kmathewgit opened 3 years ago

kmathewgit commented 3 years ago

I am building the sample program with cpprestsdk on ubuntu 18.04, but while running on ubuntu 20.04 it crashes with the following stack trace

Thread 3 "sample" received signal SIGSEGV, Segmentation fault [Switching to Thread 0x7ffff727e700 (LWP 3710880)] 0x00007ffff7deef14 in utility::details::str_iless(std::cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::cxx11::basic_string<char, std::char_traits, std::allocator > const&) () from /lib/x86_64-linux-gnu/libcpprest.so.2.10 (gdb) bt

0 0x00007ffff7deef14 in utility::details::str_iless(std::cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::cxx11::basic_string<char, std::char_traits, std::allocator > const&) () from /lib/x86_64-linux-gnu/libcpprest.so.2.10

1 0x00007ffff7d874f0 in std::_Rb_tree<std::cxx11::basic_string<char, std::char_traits, std::allocator >, std::pair<std::cxx11::basic_string<char, std::char_traits, std::allocator > const, std::__cxx11::basic_string<char, std::char_traits, std::allocator > >, std::_Select1st<std::pair<std::cxx11::basic_string<char, std::char_traits, std::allocator > const, std::cxx11::basic_string<char, std::char_traits, std::allocator > > >, web::http::http_headers::_case_insensitive_cmp, std::allocator<std::pair<std::cxx11::basic_string<char, std::char_traits, std::allocator > const, std::cxx11::basic_string<char, std::char_traits, std::allocator > > > >::find(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&) const () from /lib/x86_64-linux-gnu/libcpprest.so.2.10

2 0x00007ffff7d81078 in web::http::client::http_client::request(web::http::http_request, pplx::cancellation_token const&) ()

from /lib/x86_64-linux-gnu/libcpprest.so.2.10

3 0x000055555560a939 in web::http::client::http_client::request (this=0x7ffff727d980, mtd="GET", token=...) at /usr/include/cpprest/http_client.h:506

We are trying to statically link boost libraries.

barcharcraz commented 3 years ago

This seems like an ABI issue. Note that cpprestsdk does not have a stable ABI, so if 18.04 has a different version than 20.04 that would be bad (tm).

kmathewgit commented 3 years ago

The version of cpprestsdk is the same (2.10) in both.

On Mon, 9 Aug, 2021, 8:34 pm Charlie Barto, @.***> wrote:

This seems like an ABI issue. Note that cpprestsdk does not have a stable ABI, so if 18.04 has a different version than 20.04 that would be bad (tm).

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/microsoft/cpprestsdk/issues/1642#issuecomment-895300673, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADBZO7TGTVSZWY2EJ4LO3W3T37U6VANCNFSM5BGLWLPA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email .