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

Mismatch in CMAKE_CXX_STANDARD between the SDK and crashpad makes conan builds fail. #574

Closed
ericriff opened this issue Jul 8, 2021 · 2 comments · Fixed by #585
Closed

Comments

@ericriff
Copy link

ericriff commented Jul 8, 2021

Description

Background:
I worked along the Conan community to package the sentry native C++ SDK with Conan. In order to follow Conan's conventions of having each library on its own package, this repo has been split in 3 packages: the SDK itself, the breakpad backend and the crashpad backend. You can also choose to use sentry's fork of these backends with CMake support of the official versions with their respective annoying build systems, if you are a purist.

Issue:
setry-crashpad requires CXX 14, see https://github.com/getsentry/crashpad/blob/5cf3032b2281cf0928acc8bccf69f91ccf26b939/CMakeLists.txt#L67

This sentry-crashpad package is then consumed by sentry-native, which requires CXX 11. See https://github.com/getsentry/sentry-native/blob/master/CMakeLists.txt#L33

Since CXX 14 code ends up exposed in a header included by sentry-native, the build fails. See the log bellow.
We can patch the sources in the conan recipe that packages the SDK to use CMAKE_CXX_STANDARD 14 instead of 11, and that fixes the build. Regardless, I'm letting you guys know this so you can take a look.

Logs

Click to expand log
$ conan create recipes/sentry-native/all sentry-native/0.4.9@asd/asd -pr:b .conanprofiles/x86_64_gcc8 -pr:h .conanprofiles/x86_64_gcc8 -o sentry-native:backend=crashpad
Exporting package recipe
sentry-native/0.4.9@asd/asd exports: File 'conandata.yml' found. Exporting it...
sentry-native/0.4.9@asd/asd exports: Copied 1 '.yml' file: conandata.yml
sentry-native/0.4.9@asd/asd exports_sources: Copied 1 '.txt' file: CMakeLists.txt
sentry-native/0.4.9@asd/asd exports_sources: Copied 6 '.patch' files
sentry-native/0.4.9@asd/asd: A new conanfile.py version was exported
sentry-native/0.4.9@asd/asd: Folder: /home/eric/.conan/data/sentry-native/0.4.9/asd/asd/export
sentry-native/0.4.9@asd/asd: Using the exported files summary hash as the recipe revision: c14feec042441b9682c01fa2d7f0ed8c 
sentry-native/0.4.9@asd/asd: Exported revision: c14feec042441b9682c01fa2d7f0ed8c
Configuration (profile_host):
[settings]
arch=x86_64
arch_build=x86_64
build_type=Release
compiler=gcc
compiler.libcxx=libstdc++11
compiler.version=8
os=Linux
os_build=Linux
[options]
sentry-native:backend=crashpad
[build_requires]
[env]
CPATH=[/home/eric/conan-center-index-eriff/.conanprofiles/../irstd/include]
Configuration (profile_build):
[settings]
arch=x86_64
arch_build=x86_64
build_type=Release
compiler=gcc
compiler.libcxx=libstdc++11
compiler.version=8
os=Linux
os_build=Linux
[options]
[build_requires]
[env]
CPATH=[/home/eric/conan-center-index-eriff/.conanprofiles/../irstd/include]
libcurl/7.75.0: Not found in local cache, looking in remotes...
libcurl/7.75.0: Trying with 'conan-brewst'...
libcurl/7.75.0: Trying with 'conan-center'...
Downloading conanmanifest.txt completed [0.44k]                                          
Downloading conanfile.py completed [23.71k]                                              
Downloading conan_export.tgz completed [0.24k]                                           
Decompressing conan_export.tgz completed [0.00k]                                         
libcurl/7.75.0: Downloaded recipe revision f4f325d8afec13980b1ae66d72133792
openssl/1.1.1k: Not found in local cache, looking in remotes...
openssl/1.1.1k: Trying with 'conan-brewst'...
openssl/1.1.1k: Trying with 'conan-center'...
Downloading conanmanifest.txt completed [0.18k]                                          
Downloading conanfile.py completed [38.66k]                                              
Downloading conan_export.tgz completed [0.25k]                                           
Decompressing conan_export.tgz completed [0.00k]                                         
openssl/1.1.1k: Downloaded recipe revision 3555e93beb1e5904c8f0689e8fce854e
zlib/1.2.11: Not found in local cache, looking in remotes...
zlib/1.2.11: Trying with 'conan-brewst'...
zlib/1.2.11: Trying with 'conan-center'...
Downloading conanmanifest.txt completed [0.35k]                                          
Downloading conanfile.py completed [5.94k]                                               
Downloading conan_export.tgz completed [0.34k]                                           
Decompressing conan_export.tgz completed [0.00k]                                         
zlib/1.2.11: Downloaded recipe revision 08c5163c8e302d1482d8fa2be93736af
sentry-crashpad/0.4.9: Not found in local cache, looking in remotes...
sentry-crashpad/0.4.9: Trying with 'conan-brewst'...
sentry-crashpad/0.4.9: Trying with 'conan-center'...
Downloading conanmanifest.txt completed [0.55k]                                          
Downloading conanfile.py completed [6.79k]                                               
Downloading conan_export.tgz completed [0.32k]                                           
Decompressing conan_export.tgz completed [0.00k]                                         
sentry-crashpad/0.4.9: Downloaded recipe revision 4bf8bb4bd949e9dbc3578dcc976bede0
sentry-native/0.4.9@asd/asd (test package): Installing package
Requirements
    libcurl/7.75.0 from 'conan-center' - Downloaded
    openssl/1.1.1k from 'conan-center' - Downloaded
    sentry-crashpad/0.4.9 from 'conan-center' - Downloaded
    sentry-native/0.4.9@asd/asd from local cache - Cache
    zlib/1.2.11 from 'conan-center' - Downloaded
Packages
    libcurl/7.75.0:86e78c3decac64e7b79c84e88e3c36f54c53169e - Download
    openssl/1.1.1k:1d877a3df840030e6a8abb74c5ffb9088d08b47a - Download
    sentry-crashpad/0.4.9:97bbc86a77b3d7e33de576e66d7194fa465d72bb - Download
    sentry-native/0.4.9@asd/asd:90a2115cffa595effc00da6fca072da2749c2653 - Build
    zlib/1.2.11:1d877a3df840030e6a8abb74c5ffb9088d08b47a - Download

Installing (downloading, building) binaries...
openssl/1.1.1k: Retrieving package 1d877a3df840030e6a8abb74c5ffb9088d08b47a from remote 'conan-center' 
Downloading conanmanifest.txt completed [6.30k]                                          
Downloading conaninfo.txt completed [2.21k]                                              
Downloading conan_package.tgz completed [3910.01k]                                       
Decompressing conan_package.tgz completed [0.00k]                                        
openssl/1.1.1k: Package installed 1d877a3df840030e6a8abb74c5ffb9088d08b47a
openssl/1.1.1k: Downloaded package revision e011726a6dd7238b8986e8ff595cbbed
zlib/1.2.11: Retrieving package 1d877a3df840030e6a8abb74c5ffb9088d08b47a from remote 'conan-center' 
Downloading conanmanifest.txt completed [0.25k]                                          
Downloading conaninfo.txt completed [0.41k]                                              
Downloading conan_package.tgz completed [89.20k]                                         
Decompressing conan_package.tgz completed [0.00k]                                        
zlib/1.2.11: Package installed 1d877a3df840030e6a8abb74c5ffb9088d08b47a
zlib/1.2.11: Downloaded package revision c924aae277aa0a684cc3350a7a559ebf
libcurl/7.75.0: Retrieving package 86e78c3decac64e7b79c84e88e3c36f54c53169e from remote 'conan-center' 
Downloading conanmanifest.txt completed [0.85k]                                          
Downloading conaninfo.txt completed [2.64k]                                              
Downloading conan_package.tgz completed [2303.11k]                                       
Decompressing conan_package.tgz completed [0.00k]                                        
libcurl/7.75.0: Package installed 86e78c3decac64e7b79c84e88e3c36f54c53169e
libcurl/7.75.0: Downloaded package revision 7d83cb368bf4c1a0817afe4094e6e783
sentry-crashpad/0.4.9: Retrieving package 97bbc86a77b3d7e33de576e66d7194fa465d72bb from remote 'conan-center' 
Downloading conanmanifest.txt completed [22.24k]                                         
Downloading conaninfo.txt completed [2.02k]                                              
Downloading conan_package.tgz completed [2696.89k]                                       
Decompressing conan_package.tgz completed [0.00k]                                        
sentry-crashpad/0.4.9: Package installed 97bbc86a77b3d7e33de576e66d7194fa465d72bb
sentry-crashpad/0.4.9: Downloaded package revision 421d2dc7d7af9b8840eef3939a2afd51
sentry-crashpad/0.4.9: Appending PATH environment variable: /home/eric/.conan/data/sentry-crashpad/0.4.9/_/_/package/97bbc86a77b3d7e33de576e66d7194fa465d72bb/bin
sentry-native/0.4.9@asd/asd: Configuring sources in /home/eric/.conan/data/sentry-native/0.4.9/asd/asd/source
Downloading sentry-native.zip completed [5921.97k]                                       

Unzipping 20.0MB, this can take a while
Unzipping 100 %                                                       
sentry-native/0.4.9@asd/asd: Copying sources to build folder
sentry-native/0.4.9@asd/asd: Building your package in /home/eric/.conan/data/sentry-native/0.4.9/asd/asd/build/90a2115cffa595effc00da6fca072da2749c2653
sentry-native/0.4.9@asd/asd: Generator cmake created conanbuildinfo.cmake
sentry-native/0.4.9@asd/asd: Generator cmake_find_package created FindCURL.cmake
sentry-native/0.4.9@asd/asd: Generator cmake_find_package created Findcrashpad.cmake
sentry-native/0.4.9@asd/asd: Generator cmake_find_package created FindOpenSSL.cmake
sentry-native/0.4.9@asd/asd: Generator cmake_find_package created FindZLIB.cmake
sentry-native/0.4.9@asd/asd: Calling build()

----Running------
> cd '/home/eric/.conan/data/sentry-native/0.4.9/asd/asd/build/90a2115cffa595effc00da6fca072da2749c2653' && cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE="Release" -DCONAN_IN_LOCAL_CACHE="ON" -DCONAN_COMPILER="gcc" -DCONAN_COMPILER_VERSION="8" -DCONAN_CXX_FLAGS="-m64" -DCONAN_SHARED_LINKER_FLAGS="-m64" -DCONAN_C_FLAGS="-m64" -DCONAN_LIBCXX="libstdc++11" -DBUILD_SHARED_LIBS="OFF" -DCMAKE_INSTALL_PREFIX="/home/eric/.conan/data/sentry-native/0.4.9/asd/asd/package/90a2115cffa595effc00da6fca072da2749c2653" -DCMAKE_INSTALL_BINDIR="bin" -DCMAKE_INSTALL_SBINDIR="bin" -DCMAKE_INSTALL_LIBEXECDIR="bin" -DCMAKE_INSTALL_LIBDIR="lib" -DCMAKE_INSTALL_INCLUDEDIR="include" -DCMAKE_INSTALL_OLDINCLUDEDIR="include" -DCMAKE_INSTALL_DATAROOTDIR="share" -DCONAN_CMAKE_POSITION_INDEPENDENT_CODE="ON" -DCMAKE_MODULE_PATH="/home/eric/.conan/data/sentry-native/0.4.9/asd/asd/build/90a2115cffa595effc00da6fca072da2749c2653" -DCMAKE_EXPORT_NO_PACKAGE_REGISTRY="ON" -DCONAN_EXPORTED="1" -DSENTRY_BACKEND="crashpad" -DSENTRY_CRASHPAD_SYSTEM="True" -DSENTRY_ENABLE_INSTALL="True" -DSENTRY_TRANSPORT="curl" -DSENTRY_PIC="True" -DSENTRY_INTEGRATION_QT="False" -Wno-dev '/home/eric/.conan/data/sentry-native/0.4.9/asd/asd/build/90a2115cffa595effc00da6fca072da2749c2653'
-----------------
-- The C compiler identification is GNU 8.4.0
-- The CXX compiler identification is GNU 8.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc - works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ - works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Conan: called by CMake conan helper
-- Conan: called inside local cache
-- Conan: Adjusting output directories
-- Conan: Using cmake global configuration
-- Conan: Adjusting default RPATHs Conan policies
-- Conan: Adjusting language standard
-- Conan: Adjusting fPIC flag (ON)
-- Conan: Compiler GCC>=5, checking major version 8
-- Conan: Checking correct version: 8
-- Conan: C++ stdlib: libstdc++11
-- The ASM compiler identification is GNU
-- Found assembler: /usr/bin/cc
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE  
-- SENTRY_TRANSPORT=curl
-- SENTRY_BACKEND=crashpad
-- SENTRY_LIBRARY_TYPE=STATIC
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of long
-- Check size of long - done
-- Conan: Using autogenerated FindCURL.cmake
-- Found CURL: 7.75.0 (found version "7.75.0") 
-- Library curl found /home/eric/.conan/data/libcurl/7.75.0/_/_/package/86e78c3decac64e7b79c84e88e3c36f54c53169e/lib/libcurl.a
-- Found: /home/eric/.conan/data/libcurl/7.75.0/_/_/package/86e78c3decac64e7b79c84e88e3c36f54c53169e/lib/libcurl.a
-- Conan: Using autogenerated FindOpenSSL.cmake
-- Found OpenSSL: 1.1.1k (found version "1.1.1k") 
-- Library ssl found /home/eric/.conan/data/openssl/1.1.1k/_/_/package/1d877a3df840030e6a8abb74c5ffb9088d08b47a/lib/libssl.a
-- Found: /home/eric/.conan/data/openssl/1.1.1k/_/_/package/1d877a3df840030e6a8abb74c5ffb9088d08b47a/lib/libssl.a
-- Library crypto found /home/eric/.conan/data/openssl/1.1.1k/_/_/package/1d877a3df840030e6a8abb74c5ffb9088d08b47a/lib/libcrypto.a
-- Found: /home/eric/.conan/data/openssl/1.1.1k/_/_/package/1d877a3df840030e6a8abb74c5ffb9088d08b47a/lib/libcrypto.a
-- Library crypto found /home/eric/.conan/data/openssl/1.1.1k/_/_/package/1d877a3df840030e6a8abb74c5ffb9088d08b47a/lib/libcrypto.a
-- Found: /home/eric/.conan/data/openssl/1.1.1k/_/_/package/1d877a3df840030e6a8abb74c5ffb9088d08b47a/lib/libcrypto.a
-- Library ssl found /home/eric/.conan/data/openssl/1.1.1k/_/_/package/1d877a3df840030e6a8abb74c5ffb9088d08b47a/lib/libssl.a
-- Found: /home/eric/.conan/data/openssl/1.1.1k/_/_/package/1d877a3df840030e6a8abb74c5ffb9088d08b47a/lib/libssl.a
-- Conan: Using autogenerated FindZLIB.cmake
-- Found ZLIB: 1.2.11 (found version "1.2.11") 
-- Library z found /home/eric/.conan/data/zlib/1.2.11/_/_/package/1d877a3df840030e6a8abb74c5ffb9088d08b47a/lib/libz.a
-- Found: /home/eric/.conan/data/zlib/1.2.11/_/_/package/1d877a3df840030e6a8abb74c5ffb9088d08b47a/lib/libz.a
-- Library curl found /home/eric/.conan/data/libcurl/7.75.0/_/_/package/86e78c3decac64e7b79c84e88e3c36f54c53169e/lib/libcurl.a
-- Found: /home/eric/.conan/data/libcurl/7.75.0/_/_/package/86e78c3decac64e7b79c84e88e3c36f54c53169e/lib/libcurl.a
-- Conan: Using autogenerated Findcrashpad.cmake
-- Found crashpad: 0.4.9 (found version "0.4.9") 
-- Library crashpad_handler_lib found /home/eric/.conan/data/sentry-crashpad/0.4.9/_/_/package/97bbc86a77b3d7e33de576e66d7194fa465d72bb/lib/libcrashpad_handler_lib.a
-- Found: /home/eric/.conan/data/sentry-crashpad/0.4.9/_/_/package/97bbc86a77b3d7e33de576e66d7194fa465d72bb/lib/libcrashpad_handler_lib.a
-- Library crashpad_minidump found /home/eric/.conan/data/sentry-crashpad/0.4.9/_/_/package/97bbc86a77b3d7e33de576e66d7194fa465d72bb/lib/libcrashpad_minidump.a
-- Found: /home/eric/.conan/data/sentry-crashpad/0.4.9/_/_/package/97bbc86a77b3d7e33de576e66d7194fa465d72bb/lib/libcrashpad_minidump.a
-- Library crashpad_snapshot found /home/eric/.conan/data/sentry-crashpad/0.4.9/_/_/package/97bbc86a77b3d7e33de576e66d7194fa465d72bb/lib/libcrashpad_snapshot.a
-- Found: /home/eric/.conan/data/sentry-crashpad/0.4.9/_/_/package/97bbc86a77b3d7e33de576e66d7194fa465d72bb/lib/libcrashpad_snapshot.a
-- Library crashpad_client found /home/eric/.conan/data/sentry-crashpad/0.4.9/_/_/package/97bbc86a77b3d7e33de576e66d7194fa465d72bb/lib/libcrashpad_client.a
-- Found: /home/eric/.conan/data/sentry-crashpad/0.4.9/_/_/package/97bbc86a77b3d7e33de576e66d7194fa465d72bb/lib/libcrashpad_client.a
-- Library crashpad_util found /home/eric/.conan/data/sentry-crashpad/0.4.9/_/_/package/97bbc86a77b3d7e33de576e66d7194fa465d72bb/lib/libcrashpad_util.a
-- Found: /home/eric/.conan/data/sentry-crashpad/0.4.9/_/_/package/97bbc86a77b3d7e33de576e66d7194fa465d72bb/lib/libcrashpad_util.a
-- Library mini_chromium found /home/eric/.conan/data/sentry-crashpad/0.4.9/_/_/package/97bbc86a77b3d7e33de576e66d7194fa465d72bb/lib/libmini_chromium.a
-- Found: /home/eric/.conan/data/sentry-crashpad/0.4.9/_/_/package/97bbc86a77b3d7e33de576e66d7194fa465d72bb/lib/libmini_chromium.a
-- Library crashpad_compat found /home/eric/.conan/data/sentry-crashpad/0.4.9/_/_/package/97bbc86a77b3d7e33de576e66d7194fa465d72bb/lib/libcrashpad_compat.a
-- Found: /home/eric/.conan/data/sentry-crashpad/0.4.9/_/_/package/97bbc86a77b3d7e33de576e66d7194fa465d72bb/lib/libcrashpad_compat.a
-- Library crashpad_tools found /home/eric/.conan/data/sentry-crashpad/0.4.9/_/_/package/97bbc86a77b3d7e33de576e66d7194fa465d72bb/lib/libcrashpad_tools.a
-- Found: /home/eric/.conan/data/sentry-crashpad/0.4.9/_/_/package/97bbc86a77b3d7e33de576e66d7194fa465d72bb/lib/libcrashpad_tools.a
-- Conan: Dependency ZLIB already found
-- Conan: Dependency OpenSSL already found
-- Library crashpad_tools found /home/eric/.conan/data/sentry-crashpad/0.4.9/_/_/package/97bbc86a77b3d7e33de576e66d7194fa465d72bb/lib/libcrashpad_tools.a
-- Found: /home/eric/.conan/data/sentry-crashpad/0.4.9/_/_/package/97bbc86a77b3d7e33de576e66d7194fa465d72bb/lib/libcrashpad_tools.a
-- Library crashpad_compat found /home/eric/.conan/data/sentry-crashpad/0.4.9/_/_/package/97bbc86a77b3d7e33de576e66d7194fa465d72bb/lib/libcrashpad_compat.a
-- Found: /home/eric/.conan/data/sentry-crashpad/0.4.9/_/_/package/97bbc86a77b3d7e33de576e66d7194fa465d72bb/lib/libcrashpad_compat.a
-- Library mini_chromium found /home/eric/.conan/data/sentry-crashpad/0.4.9/_/_/package/97bbc86a77b3d7e33de576e66d7194fa465d72bb/lib/libmini_chromium.a
-- Found: /home/eric/.conan/data/sentry-crashpad/0.4.9/_/_/package/97bbc86a77b3d7e33de576e66d7194fa465d72bb/lib/libmini_chromium.a
-- Library crashpad_util found /home/eric/.conan/data/sentry-crashpad/0.4.9/_/_/package/97bbc86a77b3d7e33de576e66d7194fa465d72bb/lib/libcrashpad_util.a
-- Found: /home/eric/.conan/data/sentry-crashpad/0.4.9/_/_/package/97bbc86a77b3d7e33de576e66d7194fa465d72bb/lib/libcrashpad_util.a
-- Library crashpad_client found /home/eric/.conan/data/sentry-crashpad/0.4.9/_/_/package/97bbc86a77b3d7e33de576e66d7194fa465d72bb/lib/libcrashpad_client.a
-- Found: /home/eric/.conan/data/sentry-crashpad/0.4.9/_/_/package/97bbc86a77b3d7e33de576e66d7194fa465d72bb/lib/libcrashpad_client.a
-- Library crashpad_snapshot found /home/eric/.conan/data/sentry-crashpad/0.4.9/_/_/package/97bbc86a77b3d7e33de576e66d7194fa465d72bb/lib/libcrashpad_snapshot.a
-- Found: /home/eric/.conan/data/sentry-crashpad/0.4.9/_/_/package/97bbc86a77b3d7e33de576e66d7194fa465d72bb/lib/libcrashpad_snapshot.a
-- Library crashpad_minidump found /home/eric/.conan/data/sentry-crashpad/0.4.9/_/_/package/97bbc86a77b3d7e33de576e66d7194fa465d72bb/lib/libcrashpad_minidump.a
-- Found: /home/eric/.conan/data/sentry-crashpad/0.4.9/_/_/package/97bbc86a77b3d7e33de576e66d7194fa465d72bb/lib/libcrashpad_minidump.a
-- Library crashpad_handler_lib found /home/eric/.conan/data/sentry-crashpad/0.4.9/_/_/package/97bbc86a77b3d7e33de576e66d7194fa465d72bb/lib/libcrashpad_handler_lib.a
-- Found: /home/eric/.conan/data/sentry-crashpad/0.4.9/_/_/package/97bbc86a77b3d7e33de576e66d7194fa465d72bb/lib/libcrashpad_handler_lib.a
-- Configuring done
-- Generating done
CMake Warning:
  Manually-specified variables were not used by the project:

    CMAKE_EXPORT_NO_PACKAGE_REGISTRY


-- Build files have been written to: /home/eric/.conan/data/sentry-native/0.4.9/asd/asd/build/90a2115cffa595effc00da6fca072da2749c2653

----Running------
> cmake --build '/home/eric/.conan/data/sentry-native/0.4.9/asd/asd/build/90a2115cffa595effc00da6fca072da2749c2653' '--' '-j12'
-----------------
Scanning dependencies of target sentry
[  2%] Building C object source_subfolder/CMakeFiles/sentry.dir/src/sentry_alloc.c.o
[  5%] Building C object source_subfolder/CMakeFiles/sentry.dir/vendor/mpack.c.o
[  8%] Building C object source_subfolder/CMakeFiles/sentry.dir/src/sentry_backend.c.o
[ 11%] Building C object source_subfolder/CMakeFiles/sentry.dir/src/sentry_core.c.o
[ 14%] Building C object source_subfolder/CMakeFiles/sentry.dir/src/sentry_envelope.c.o
[ 17%] Building C object source_subfolder/CMakeFiles/sentry.dir/src/sentry_database.c.o
[ 20%] Building C object source_subfolder/CMakeFiles/sentry.dir/src/sentry_json.c.o
[ 23%] Building C object source_subfolder/CMakeFiles/sentry.dir/src/sentry_options.c.o
[ 26%] Building C object source_subfolder/CMakeFiles/sentry.dir/src/sentry_random.c.o
[ 29%] Building C object source_subfolder/CMakeFiles/sentry.dir/src/sentry_logger.c.o
[ 32%] Building C object source_subfolder/CMakeFiles/sentry.dir/src/sentry_ratelimiter.c.o
[ 35%] Building C object source_subfolder/CMakeFiles/sentry.dir/src/sentry_os.c.o
[ 38%] Building C object source_subfolder/CMakeFiles/sentry.dir/src/sentry_scope.c.o
[ 41%] Building C object source_subfolder/CMakeFiles/sentry.dir/src/sentry_session.c.o
[ 44%] Building C object source_subfolder/CMakeFiles/sentry.dir/src/sentry_slice.c.o
[ 47%] Building C object source_subfolder/CMakeFiles/sentry.dir/src/sentry_string.c.o
[ 50%] Building C object source_subfolder/CMakeFiles/sentry.dir/src/sentry_sync.c.o
[ 52%] Building C object source_subfolder/CMakeFiles/sentry.dir/src/sentry_transport.c.o
[ 55%] Building C object source_subfolder/CMakeFiles/sentry.dir/src/sentry_utils.c.o
[ 58%] Building C object source_subfolder/CMakeFiles/sentry.dir/src/sentry_uuid.c.o
[ 61%] Building C object source_subfolder/CMakeFiles/sentry.dir/src/sentry_value.c.o
[ 64%] Building C object source_subfolder/CMakeFiles/sentry.dir/src/path/sentry_path.c.o
[ 67%] Building C object source_subfolder/CMakeFiles/sentry.dir/src/transports/sentry_disk_transport.c.o
[ 70%] Building C object source_subfolder/CMakeFiles/sentry.dir/src/unwinder/sentry_unwinder.c.o
[ 73%] Building C object source_subfolder/CMakeFiles/sentry.dir/src/transports/sentry_function_transport.c.o
[ 76%] Building C object source_subfolder/CMakeFiles/sentry.dir/src/sentry_unix_pageallocator.c.o
[ 79%] Building C object source_subfolder/CMakeFiles/sentry.dir/src/path/sentry_path_unix.c.o
[ 82%] Building C object source_subfolder/CMakeFiles/sentry.dir/src/symbolizer/sentry_symbolizer_unix.c.o
[ 85%] Building C object source_subfolder/CMakeFiles/sentry.dir/src/modulefinder/sentry_modulefinder_linux.c.o
[ 88%] Building C object source_subfolder/CMakeFiles/sentry.dir/src/transports/sentry_transport_curl.c.o
[ 91%] Building CXX object source_subfolder/CMakeFiles/sentry.dir/src/backends/sentry_backend_crashpad.cpp.o
[ 94%] Building C object source_subfolder/CMakeFiles/sentry.dir/src/unwinder/sentry_unwinder_libbacktrace.c.o
[ 97%] Building C object source_subfolder/CMakeFiles/sentry.dir/vendor/stb_sprintf.c.o
/home/eric/.conan/data/sentry-native/0.4.9/asd/asd/build/90a2115cffa595effc00da6fca072da2749c2653/source_subfolder/src/backends/sentry_backend_crashpad.cpp:24:36: warning: unknown option after ‘#pragma GCC diagnostic’ kind [-Wpragmas]
 #    pragma GCC diagnostic ignored "-Wgnu-zero-variadic-macro-arguments"
                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/eric/.conan/data/sentry-native/0.4.9/asd/asd/build/90a2115cffa595effc00da6fca072da2749c2653/source_subfolder/src/backends/sentry_backend_crashpad.cpp:25:36: warning: unknown option after ‘#pragma GCC diagnostic’ kind [-Wpragmas]
 #    pragma GCC diagnostic ignored "-Wfour-char-constants"
                                    ^~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/eric/.conan/data/sentry-crashpad/0.4.9/_/_/package/97bbc86a77b3d7e33de576e66d7194fa465d72bb/include/crashpad/client/annotation_list.h:19,
                 from /home/eric/.conan/data/sentry-crashpad/0.4.9/_/_/package/97bbc86a77b3d7e33de576e66d7194fa465d72bb/include/crashpad/client/crashpad_info.h:22,
                 from /home/eric/.conan/data/sentry-native/0.4.9/asd/asd/build/90a2115cffa595effc00da6fca072da2749c2653/source_subfolder/src/backends/sentry_backend_crashpad.cpp:33:
/home/eric/.conan/data/sentry-crashpad/0.4.9/_/_/package/97bbc86a77b3d7e33de576e66d7194fa465d72bb/include/crashpad/client/annotation.h: In static member function ‘static constexpr crashpad::Annotation::Type crashpad::Annotation::UserDefinedType(uint16_t)’:
/home/eric/.conan/data/sentry-crashpad/0.4.9/_/_/package/97bbc86a77b3d7e33de576e66d7194fa465d72bb/include/crashpad/client/annotation.h:116:3: error: body of ‘constexpr’ function ‘static constexpr crashpad::Annotation::Type crashpad::Annotation::UserDefinedType(uint16_t)’ not a return-statement
   }
   ^
At global scope:
cc1plus: warning: unrecognized command line option ‘-Wno-gnu-include-next’
source_subfolder/CMakeFiles/sentry.dir/build.make:469: recipe for target 'source_subfolder/CMakeFiles/sentry.dir/src/backends/sentry_backend_crashpad.cpp.o' failed
make[2]: *** [source_subfolder/CMakeFiles/sentry.dir/src/backends/sentry_backend_crashpad.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
CMakeFiles/Makefile2:130: recipe for target 'source_subfolder/CMakeFiles/sentry.dir/all' failed
make[1]: *** [source_subfolder/CMakeFiles/sentry.dir/all] Error 2
Makefile:146: recipe for target 'all' failed
make: *** [all] Error 2
sentry-native/0.4.9@asd/asd: 
sentry-native/0.4.9@asd/asd: ERROR: Package '90a2115cffa595effc00da6fca072da2749c2653' build failed
sentry-native/0.4.9@asd/asd: WARN: Build folder /home/eric/.conan/data/sentry-native/0.4.9/asd/asd/build/90a2115cffa595effc00da6fca072da2749c2653
ERROR: sentry-native/0.4.9@asd/asd: Error in build() method, line 116
        cmake.build()
        ConanException: Error 2 while executing cmake --build '/home/eric/.conan/data/sentry-native/0.4.9/asd/asd/build/90a2115cffa595effc00da6fca072da2749c2653' '--' '-j12'

@Swatinem
Copy link
Member

Swatinem commented Jul 9, 2021

I have no objection to just raise that to c++14 in general

@ericriff
Copy link
Author

It feels like the cleanest approach here.

ericriff added a commit to ericriff/conan-center-index that referenced this issue Jul 12, 2021
…sible dependencies, exposes CXX 14 code on its headers.

This will be addressed in upstream sentry-native
getsentry/sentry-native#574
ericriff added a commit to ericriff/conan-center-index that referenced this issue Jul 12, 2021
…sible dependencies, exposes CXX 14 code on its headers.

This will be addressed in upstream sentry-native
getsentry/sentry-native#574
ericriff added a commit to ericriff/conan-center-index that referenced this issue Jul 12, 2021
…sible dependencies, exposes CXX 14 code on its headers.

This will be addressed in upstream sentry-native
getsentry/sentry-native#574
conan-center-bot pushed a commit to conan-io/conan-center-index that referenced this issue Jul 15, 2021
* Build sentry-native with CXX 14 since sentry-crashpad, one of its possible dependencies, exposes CXX 14 code on its headers.
This will be addressed in upstream sentry-native
getsentry/sentry-native#574

* Support breakpad and sentry-breakpad as backends

* Add minimum compiler version check / raise.

* Add pkgconf as build_requirement if breakpad is set as backend
AndreyMlashkin pushed a commit to AndreyMlashkin/conan-center-index that referenced this issue Jul 19, 2021
* Build sentry-native with CXX 14 since sentry-crashpad, one of its possible dependencies, exposes CXX 14 code on its headers.
This will be addressed in upstream sentry-native
getsentry/sentry-native#574

* Support breakpad and sentry-breakpad as backends

* Add minimum compiler version check / raise.

* Add pkgconf as build_requirement if breakpad is set as backend
mjvankampen pushed a commit to mjvankampen/conan-center-index that referenced this issue Aug 24, 2021
Without this patch sentry does not compile, ref. getsentry/sentry-native#574
mjvankampen pushed a commit to mjvankampen/sentry-native that referenced this issue Aug 24, 2021
conan-center-bot pushed a commit to conan-io/conan-center-index that referenced this issue Sep 29, 2021
yucelalbar added a commit to mystaff/sentry-native that referenced this issue Oct 20, 2021
* feat: Add support for Qt 6 (getsentry#509)

* fix: Windows SDK Compiler Warning (getsentry#511)

* fix: Validate tm put into strftime (getsentry#510)

* fix: Rewrite the Linux module finder (getsentry#431)

It now works in memory, without requiring to mmap the libraries again,
which should make it work correctly on android when loading libraries
directly from apk or appbundle files.

The new code will keep track of readable memory maps and will
translate read requests based on the offset of those memory maps,
making sure that we actually can read whatever we are trying to read.

* build: Avoid building all targets (getsentry#512)

It looks like cmake is broken and builds ALL the targets when the parallel option is specified first, lol

* fix: Update Crashpad to 2021-04-12 and fix macOS universal build (getsentry#513)

* feat: Invoke before_send hook when using Crashpad (getsentry#519)

* feat: Add more Event Payload convenience methods (getsentry#517)

Adds:
* `sentry_value_new_exception`
* `sentry_value_new_thread`
* `sentry_value_new_stacktrace`
* `sentry_event_add_exception`
* `sentry_event_add_thread`

Deprecates `sentry_event_value_add_stacktrace`

* feat: Introduce `sentry_close` (getsentry#518)

This replaces the former `sentry_shutdown`, which is being forwarded.

* meta: Prepare Changelog for upcoming release (getsentry#522)

* ref: Pass options to scope apply directly (getsentry#521)

* fix: Further clean up platform libraries for static linking (getsentry#523)

* fix: Better macOS availability checks (getsentry#524)

This should allow building on older macOS versions as well as
running on older versions by fixing the usage of __builtin_available,
and adding a different clock source for older macOS versions.

* release: 0.4.9

* fix: Avoid double-free on invalid DSN (getsentry#527)

* meta: Use correct libunwindstack commit

* fix: Allow for Unity builds (getsentry#536)

* ref: Add more testcases that trigger crashes in various ways (getsentry#538)

* ref(craft): Modernize Craft config (getsentry#543)

* fix: Update venv and test-discovery Makefile targets (getsentry#544)

* fix: Avoid recursion when using `sentry_reinstall_backend` (getsentry#548)

Previously, the `inproc` and `crashpad` (on linux) backends didn’t correctly reset their signal handlers when doing `reinstall_backend` (or multiple `init` calls for that matter).
This has led to an infinite loop generating crashes.

The fix now correctly unregisters the inproc/crashpad signal handlers, and adds an integration test using `reinstall_backend` to make sure we do not end up in an infinite loop.

Co-authored-by: Mischa Alff <[email protected]>

* fix: Address -Wundef warning for SENTRY_UNITTEST defines (getsentry#549)

* build: Set 32-bit option for compiling assembly as well (getsentry#550)

This fixes compilation of breakpad for 32-bit systems

* meta: Update break/crashpad to 2021-06-14 (getsentry#552)

* fix: Shorten/Split Locked sections to avoid deadlock (getsentry#551)

We have received a report that the `sentry_get_modules_list` on mac can deadlock
when other code concurrently does a `dlopen` and thus invokes the `add_image`
callback from a different thread.

We shorten/split the locked blocks in order to avoid holding a lock in the
`get_modules` function whenever the `add_image` function is being invoked possibly
from other threads.

* fix: Tighten Stack Usage (getsentry#553)

According to some docs, JVM/JNI stacks on Android can be as small as
32K, and our own sigaltstack is not much larger with 64K.
Make sure to avoid large stack allocations as much as possible.

We have especially seen the literal content of `/proc/self/maps` as well
as formatted addresses inside corrupted release/environment attributes,
which might point to overflows that write into a previously allocated
release/environment string.

* meta: Update Changelog (getsentry#556)

* release: 0.4.10

* reformat

* fix: Make Linux modulefinder/unwinder safer (getsentry#559)

This is using the `process_vm_read` call to safely poke at random memory. It also makes sure to shim the libc provided call with a direct syscall for older Android devices.

* docs: Try to better explain unwind API (getsentry#564)

* fix: Make Crashpad Backend respect max_breadcrumbs setting (getsentry#566)

* fix: Cancel slow winhttp requests on shutdown (getsentry#570)

Co-authored-by: Gerhard Herbert <[email protected]>

* fix: Properly close the background worker thread on timeout (getsentry#571)

* fix: Possible race conditions in init/close and sessions (getsentry#545)

* meta: Draft Changelog (getsentry#572)

* release: 0.4.11

* feat: Make shutdown timeout customizable (getsentry#577)

Co-authored-by: Andrei Muraru <[email protected]>

* CMake: Link to the CURL::libcurl target when available (getsentry#579)

Caters better for newer cmake versions.

* meta: Update crashpad to 2021-07-14 (getsentry#580)

* fix: Properly use `SENTRY_BUILD_RUNTIMESTATIC` for `sentry_fuzz_json` unit test (getsentry#583)

* meta: Update break/crashpad to 2021-07-28 (getsentry#584)

* release: 0.4.12

* fix: Increment CXX standard to 14 to allow crashpad build (getsentry#585)

Fixes getsentry#574

* feat(STAFF-121291): Edits to be compatible with Windows

* meta: Bump python dependencies (getsentry#600)

The old version of pytest breaks with python 3.10 which changed a
little how code object internals work.  Since python 3.10 is now
released it starts being used in CI.

* Skip changes on ci.yml file

* Change xcode version to 13.0.0

* git submodule updated

Co-authored-by: Tor Arne Vestbø <[email protected]>
Co-authored-by: Arpad Borsos <[email protected]>
Co-authored-by: Luke Street <[email protected]>
Co-authored-by: getsentry-bot <[email protected]>
Co-authored-by: Sentry Bot <[email protected]>
Co-authored-by: Arpad Borsos <[email protected]>
Co-authored-by: bschatt <[email protected]>
Co-authored-by: Burak Yigit Kaya <[email protected]>
Co-authored-by: MikeRumplerSentry <[email protected]>
Co-authored-by: Mischa Alff <[email protected]>
Co-authored-by: Michał Janiszewski <[email protected]>
Co-authored-by: getsentry-bot <[email protected]>
Co-authored-by: Gerhard Herbert <[email protected]>
Co-authored-by: andrei-mu <[email protected]>
Co-authored-by: Andrei Muraru <[email protected]>
Co-authored-by: pastdue <[email protected]>
Co-authored-by: Roshan Padaki <[email protected]>
Co-authored-by: mjvankampen <[email protected]>
Co-authored-by: Yucel Albar <[email protected]>
Co-authored-by: Floris Bruynooghe <[email protected]>
yucelalbar added a commit to mystaff/sentry-native that referenced this issue Oct 25, 2021
* feat: Add support for Qt 6 (getsentry#509)

* fix: Windows SDK Compiler Warning (getsentry#511)

* fix: Validate tm put into strftime (getsentry#510)

* fix: Rewrite the Linux module finder (getsentry#431)

It now works in memory, without requiring to mmap the libraries again,
which should make it work correctly on android when loading libraries
directly from apk or appbundle files.

The new code will keep track of readable memory maps and will
translate read requests based on the offset of those memory maps,
making sure that we actually can read whatever we are trying to read.

* build: Avoid building all targets (getsentry#512)

It looks like cmake is broken and builds ALL the targets when the parallel option is specified first, lol

* fix: Update Crashpad to 2021-04-12 and fix macOS universal build (getsentry#513)

* feat: Invoke before_send hook when using Crashpad (getsentry#519)

* feat: Add more Event Payload convenience methods (getsentry#517)

Adds:
* `sentry_value_new_exception`
* `sentry_value_new_thread`
* `sentry_value_new_stacktrace`
* `sentry_event_add_exception`
* `sentry_event_add_thread`

Deprecates `sentry_event_value_add_stacktrace`

* feat: Introduce `sentry_close` (getsentry#518)

This replaces the former `sentry_shutdown`, which is being forwarded.

* meta: Prepare Changelog for upcoming release (getsentry#522)

* ref: Pass options to scope apply directly (getsentry#521)

* fix: Further clean up platform libraries for static linking (getsentry#523)

* fix: Better macOS availability checks (getsentry#524)

This should allow building on older macOS versions as well as
running on older versions by fixing the usage of __builtin_available,
and adding a different clock source for older macOS versions.

* release: 0.4.9

* fix: Avoid double-free on invalid DSN (getsentry#527)

* meta: Use correct libunwindstack commit

* fix: Allow for Unity builds (getsentry#536)

* ref: Add more testcases that trigger crashes in various ways (getsentry#538)

* ref(craft): Modernize Craft config (getsentry#543)

* fix: Update venv and test-discovery Makefile targets (getsentry#544)

* fix: Avoid recursion when using `sentry_reinstall_backend` (getsentry#548)

Previously, the `inproc` and `crashpad` (on linux) backends didn’t correctly reset their signal handlers when doing `reinstall_backend` (or multiple `init` calls for that matter).
This has led to an infinite loop generating crashes.

The fix now correctly unregisters the inproc/crashpad signal handlers, and adds an integration test using `reinstall_backend` to make sure we do not end up in an infinite loop.

Co-authored-by: Mischa Alff <[email protected]>

* fix: Address -Wundef warning for SENTRY_UNITTEST defines (getsentry#549)

* build: Set 32-bit option for compiling assembly as well (getsentry#550)

This fixes compilation of breakpad for 32-bit systems

* meta: Update break/crashpad to 2021-06-14 (getsentry#552)

* fix: Shorten/Split Locked sections to avoid deadlock (getsentry#551)

We have received a report that the `sentry_get_modules_list` on mac can deadlock
when other code concurrently does a `dlopen` and thus invokes the `add_image`
callback from a different thread.

We shorten/split the locked blocks in order to avoid holding a lock in the
`get_modules` function whenever the `add_image` function is being invoked possibly
from other threads.

* fix: Tighten Stack Usage (getsentry#553)

According to some docs, JVM/JNI stacks on Android can be as small as
32K, and our own sigaltstack is not much larger with 64K.
Make sure to avoid large stack allocations as much as possible.

We have especially seen the literal content of `/proc/self/maps` as well
as formatted addresses inside corrupted release/environment attributes,
which might point to overflows that write into a previously allocated
release/environment string.

* meta: Update Changelog (getsentry#556)

* release: 0.4.10

* reformat

* fix: Make Linux modulefinder/unwinder safer (getsentry#559)

This is using the `process_vm_read` call to safely poke at random memory. It also makes sure to shim the libc provided call with a direct syscall for older Android devices.

* docs: Try to better explain unwind API (getsentry#564)

* fix: Make Crashpad Backend respect max_breadcrumbs setting (getsentry#566)

* fix: Cancel slow winhttp requests on shutdown (getsentry#570)

Co-authored-by: Gerhard Herbert <[email protected]>

* fix: Properly close the background worker thread on timeout (getsentry#571)

* fix: Possible race conditions in init/close and sessions (getsentry#545)

* meta: Draft Changelog (getsentry#572)

* release: 0.4.11

* feat: Make shutdown timeout customizable (getsentry#577)

Co-authored-by: Andrei Muraru <[email protected]>

* CMake: Link to the CURL::libcurl target when available (getsentry#579)

Caters better for newer cmake versions.

* meta: Update crashpad to 2021-07-14 (getsentry#580)

* fix: Properly use `SENTRY_BUILD_RUNTIMESTATIC` for `sentry_fuzz_json` unit test (getsentry#583)

* meta: Update break/crashpad to 2021-07-28 (getsentry#584)

* release: 0.4.12

* fix: Increment CXX standard to 14 to allow crashpad build (getsentry#585)

Fixes getsentry#574

* Sentry-native is updated

* Sentry-native and submodules are updated

Co-authored-by: Tor Arne Vestbø <[email protected]>
Co-authored-by: Arpad Borsos <[email protected]>
Co-authored-by: Luke Street <[email protected]>
Co-authored-by: getsentry-bot <[email protected]>
Co-authored-by: Sentry Bot <[email protected]>
Co-authored-by: Arpad Borsos <[email protected]>
Co-authored-by: bschatt <[email protected]>
Co-authored-by: Burak Yigit Kaya <[email protected]>
Co-authored-by: MikeRumplerSentry <[email protected]>
Co-authored-by: Mischa Alff <[email protected]>
Co-authored-by: Michał Janiszewski <[email protected]>
Co-authored-by: getsentry-bot <[email protected]>
Co-authored-by: Gerhard Herbert <[email protected]>
Co-authored-by: andrei-mu <[email protected]>
Co-authored-by: Andrei Muraru <[email protected]>
Co-authored-by: pastdue <[email protected]>
Co-authored-by: Roshan Padaki <[email protected]>
Co-authored-by: mjvankampen <[email protected]>
Co-authored-by: Yucel Albar <[email protected]>
yucelalbar added a commit to mystaff/sentry-native that referenced this issue Oct 26, 2021
* feat: Add support for Qt 6 (getsentry#509)

* fix: Windows SDK Compiler Warning (getsentry#511)

* fix: Validate tm put into strftime (getsentry#510)

* fix: Rewrite the Linux module finder (getsentry#431)

It now works in memory, without requiring to mmap the libraries again,
which should make it work correctly on android when loading libraries
directly from apk or appbundle files.

The new code will keep track of readable memory maps and will
translate read requests based on the offset of those memory maps,
making sure that we actually can read whatever we are trying to read.

* build: Avoid building all targets (getsentry#512)

It looks like cmake is broken and builds ALL the targets when the parallel option is specified first, lol

* fix: Update Crashpad to 2021-04-12 and fix macOS universal build (getsentry#513)

* feat: Invoke before_send hook when using Crashpad (getsentry#519)

* feat: Add more Event Payload convenience methods (getsentry#517)

Adds:
* `sentry_value_new_exception`
* `sentry_value_new_thread`
* `sentry_value_new_stacktrace`
* `sentry_event_add_exception`
* `sentry_event_add_thread`

Deprecates `sentry_event_value_add_stacktrace`

* feat: Introduce `sentry_close` (getsentry#518)

This replaces the former `sentry_shutdown`, which is being forwarded.

* meta: Prepare Changelog for upcoming release (getsentry#522)

* ref: Pass options to scope apply directly (getsentry#521)

* fix: Further clean up platform libraries for static linking (getsentry#523)

* fix: Better macOS availability checks (getsentry#524)

This should allow building on older macOS versions as well as
running on older versions by fixing the usage of __builtin_available,
and adding a different clock source for older macOS versions.

* release: 0.4.9

* fix: Avoid double-free on invalid DSN (getsentry#527)

* meta: Use correct libunwindstack commit

* fix: Allow for Unity builds (getsentry#536)

* ref: Add more testcases that trigger crashes in various ways (getsentry#538)

* ref(craft): Modernize Craft config (getsentry#543)

* fix: Update venv and test-discovery Makefile targets (getsentry#544)

* fix: Avoid recursion when using `sentry_reinstall_backend` (getsentry#548)

Previously, the `inproc` and `crashpad` (on linux) backends didn’t correctly reset their signal handlers when doing `reinstall_backend` (or multiple `init` calls for that matter).
This has led to an infinite loop generating crashes.

The fix now correctly unregisters the inproc/crashpad signal handlers, and adds an integration test using `reinstall_backend` to make sure we do not end up in an infinite loop.

Co-authored-by: Mischa Alff <[email protected]>

* fix: Address -Wundef warning for SENTRY_UNITTEST defines (getsentry#549)

* build: Set 32-bit option for compiling assembly as well (getsentry#550)

This fixes compilation of breakpad for 32-bit systems

* meta: Update break/crashpad to 2021-06-14 (getsentry#552)

* fix: Shorten/Split Locked sections to avoid deadlock (getsentry#551)

We have received a report that the `sentry_get_modules_list` on mac can deadlock
when other code concurrently does a `dlopen` and thus invokes the `add_image`
callback from a different thread.

We shorten/split the locked blocks in order to avoid holding a lock in the
`get_modules` function whenever the `add_image` function is being invoked possibly
from other threads.

* fix: Tighten Stack Usage (getsentry#553)

According to some docs, JVM/JNI stacks on Android can be as small as
32K, and our own sigaltstack is not much larger with 64K.
Make sure to avoid large stack allocations as much as possible.

We have especially seen the literal content of `/proc/self/maps` as well
as formatted addresses inside corrupted release/environment attributes,
which might point to overflows that write into a previously allocated
release/environment string.

* meta: Update Changelog (getsentry#556)

* release: 0.4.10

* reformat

* fix: Make Linux modulefinder/unwinder safer (getsentry#559)

This is using the `process_vm_read` call to safely poke at random memory. It also makes sure to shim the libc provided call with a direct syscall for older Android devices.

* docs: Try to better explain unwind API (getsentry#564)

* fix: Make Crashpad Backend respect max_breadcrumbs setting (getsentry#566)

* fix: Cancel slow winhttp requests on shutdown (getsentry#570)

Co-authored-by: Gerhard Herbert <[email protected]>

* fix: Properly close the background worker thread on timeout (getsentry#571)

* fix: Possible race conditions in init/close and sessions (getsentry#545)

* meta: Draft Changelog (getsentry#572)

* release: 0.4.11

* feat: Make shutdown timeout customizable (getsentry#577)

Co-authored-by: Andrei Muraru <[email protected]>

* CMake: Link to the CURL::libcurl target when available (getsentry#579)

Caters better for newer cmake versions.

* meta: Update crashpad to 2021-07-14 (getsentry#580)

* fix: Properly use `SENTRY_BUILD_RUNTIMESTATIC` for `sentry_fuzz_json` unit test (getsentry#583)

* meta: Update break/crashpad to 2021-07-28 (getsentry#584)

* release: 0.4.12

* fix: Increment CXX standard to 14 to allow crashpad build (getsentry#585)

Fixes getsentry#574

* feat(STAFF-121291): Edits to be compatible with Windows

* meta: Bump python dependencies (getsentry#600)

The old version of pytest breaks with python 3.10 which changed a
little how code object internals work.  Since python 3.10 is now
released it starts being used in CI.

* Skip changes on ci.yml file

* Change xcode version to 13.0.0

* git submodule updated

* Crashpad submodule is updated

Co-authored-by: Tor Arne Vestbø <[email protected]>
Co-authored-by: Arpad Borsos <[email protected]>
Co-authored-by: Luke Street <[email protected]>
Co-authored-by: getsentry-bot <[email protected]>
Co-authored-by: Sentry Bot <[email protected]>
Co-authored-by: Arpad Borsos <[email protected]>
Co-authored-by: bschatt <[email protected]>
Co-authored-by: Burak Yigit Kaya <[email protected]>
Co-authored-by: MikeRumplerSentry <[email protected]>
Co-authored-by: Mischa Alff <[email protected]>
Co-authored-by: Michał Janiszewski <[email protected]>
Co-authored-by: getsentry-bot <[email protected]>
Co-authored-by: Gerhard Herbert <[email protected]>
Co-authored-by: andrei-mu <[email protected]>
Co-authored-by: Andrei Muraru <[email protected]>
Co-authored-by: pastdue <[email protected]>
Co-authored-by: Roshan Padaki <[email protected]>
Co-authored-by: mjvankampen <[email protected]>
Co-authored-by: Yucel Albar <[email protected]>
Co-authored-by: Floris Bruynooghe <[email protected]>
nunomluz added a commit to mystaff/sentry-native that referenced this issue Dec 27, 2021
)

* feat: Add support for Qt 6 (getsentry#509)

* fix: Windows SDK Compiler Warning (getsentry#511)

* fix: Validate tm put into strftime (getsentry#510)

* fix: Rewrite the Linux module finder (getsentry#431)

It now works in memory, without requiring to mmap the libraries again,
which should make it work correctly on android when loading libraries
directly from apk or appbundle files.

The new code will keep track of readable memory maps and will
translate read requests based on the offset of those memory maps,
making sure that we actually can read whatever we are trying to read.

* build: Avoid building all targets (getsentry#512)

It looks like cmake is broken and builds ALL the targets when the parallel option is specified first, lol

* fix: Update Crashpad to 2021-04-12 and fix macOS universal build (getsentry#513)

* feat: Invoke before_send hook when using Crashpad (getsentry#519)

* feat: Add more Event Payload convenience methods (getsentry#517)

Adds:
* `sentry_value_new_exception`
* `sentry_value_new_thread`
* `sentry_value_new_stacktrace`
* `sentry_event_add_exception`
* `sentry_event_add_thread`

Deprecates `sentry_event_value_add_stacktrace`

* feat: Introduce `sentry_close` (getsentry#518)

This replaces the former `sentry_shutdown`, which is being forwarded.

* meta: Prepare Changelog for upcoming release (getsentry#522)

* ref: Pass options to scope apply directly (getsentry#521)

* fix: Further clean up platform libraries for static linking (getsentry#523)

* fix: Better macOS availability checks (getsentry#524)

This should allow building on older macOS versions as well as
running on older versions by fixing the usage of __builtin_available,
and adding a different clock source for older macOS versions.

* release: 0.4.9

* fix: Avoid double-free on invalid DSN (getsentry#527)

* meta: Use correct libunwindstack commit

* fix: Allow for Unity builds (getsentry#536)

* ref: Add more testcases that trigger crashes in various ways (getsentry#538)

* ref(craft): Modernize Craft config (getsentry#543)

* fix: Update venv and test-discovery Makefile targets (getsentry#544)

* fix: Avoid recursion when using `sentry_reinstall_backend` (getsentry#548)

Previously, the `inproc` and `crashpad` (on linux) backends didn’t correctly reset their signal handlers when doing `reinstall_backend` (or multiple `init` calls for that matter).
This has led to an infinite loop generating crashes.

The fix now correctly unregisters the inproc/crashpad signal handlers, and adds an integration test using `reinstall_backend` to make sure we do not end up in an infinite loop.

Co-authored-by: Mischa Alff <[email protected]>

* fix: Address -Wundef warning for SENTRY_UNITTEST defines (getsentry#549)

* build: Set 32-bit option for compiling assembly as well (getsentry#550)

This fixes compilation of breakpad for 32-bit systems

* meta: Update break/crashpad to 2021-06-14 (getsentry#552)

* fix: Shorten/Split Locked sections to avoid deadlock (getsentry#551)

We have received a report that the `sentry_get_modules_list` on mac can deadlock
when other code concurrently does a `dlopen` and thus invokes the `add_image`
callback from a different thread.

We shorten/split the locked blocks in order to avoid holding a lock in the
`get_modules` function whenever the `add_image` function is being invoked possibly
from other threads.

* fix: Tighten Stack Usage (getsentry#553)

According to some docs, JVM/JNI stacks on Android can be as small as
32K, and our own sigaltstack is not much larger with 64K.
Make sure to avoid large stack allocations as much as possible.

We have especially seen the literal content of `/proc/self/maps` as well
as formatted addresses inside corrupted release/environment attributes,
which might point to overflows that write into a previously allocated
release/environment string.

* meta: Update Changelog (getsentry#556)

* release: 0.4.10

* reformat

* fix: Make Linux modulefinder/unwinder safer (getsentry#559)

This is using the `process_vm_read` call to safely poke at random memory. It also makes sure to shim the libc provided call with a direct syscall for older Android devices.

* docs: Try to better explain unwind API (getsentry#564)

* fix: Make Crashpad Backend respect max_breadcrumbs setting (getsentry#566)

* fix: Cancel slow winhttp requests on shutdown (getsentry#570)

Co-authored-by: Gerhard Herbert <[email protected]>

* fix: Properly close the background worker thread on timeout (getsentry#571)

* fix: Possible race conditions in init/close and sessions (getsentry#545)

* meta: Draft Changelog (getsentry#572)

* release: 0.4.11

* feat: Make shutdown timeout customizable (getsentry#577)

Co-authored-by: Andrei Muraru <[email protected]>

* CMake: Link to the CURL::libcurl target when available (getsentry#579)

Caters better for newer cmake versions.

* meta: Update crashpad to 2021-07-14 (getsentry#580)

* fix: Properly use `SENTRY_BUILD_RUNTIMESTATIC` for `sentry_fuzz_json` unit test (getsentry#583)

* meta: Update break/crashpad to 2021-07-28 (getsentry#584)

* release: 0.4.12

* fix: Increment CXX standard to 14 to allow crashpad build (getsentry#585)

Fixes getsentry#574

* meta: Bump python dependencies (getsentry#600)

The old version of pytest breaks with python 3.10 which changed a
little how code object internals work.  Since python 3.10 is now
released it starts being used in CI.

* fix: Ensure that a valid DSN has a public_key (getsentry#598)

* feat: AIX support (getsentry#593)

* CMake: Check whether libcurl was already found (getsentry#602)

Currently when there is any other project that brings libcurl as a dependency,
the build fails with “Could NOT find CURL (missing: CURL_LIBRARY CURL_INCLUDE_DIR)“,
even though libcurl has already added as CURL::libcurl library.

This patch adds a check for CURL_FOUND, to indicate that the library was already
found, if set by another project. It also skips the additional find_package()
step so it does not fail.

Signed-off-by: Ladislav Macoun <[email protected]>

* CMake: fix `SENTRY_BACKEND` defined in outer scope (getsentry#603)

* CMake: add ability to set solution folder name (getsentry#604)

* [pull] master from getsentry:master (#14)

* ci(codechecker): Workaround for code checker not building due to node issues (getsentry#615)

* meta: Update breakpad/crashpad to 2021-12-03 (getsentry#614)

* feat(tracing): Add config options (getsentry#613)

* fix: Correct changelog entry (getsentry#622)

* meta: Bump breakpad (getsentry#621)

* feat: Add internal UUID types (getsentry#616)

This adds in support for internal UUIDs needed by tracing,
such as the trace ID and the span ID.
 
The major difference between this and the "standard" UUID 
is that the hyphens are stripped during serialization. sentry 
appears to not consider the hyphenated representations of 
these UUIDs to be valid for certain fields in an event.

* meta: Update changelog (getsentry#625)

* release: 0.4.13

* feat(tracing): Groundwork to add tracing context to all events (getsentry#617)

This adds the appropriate stubs and fields to 
start storing spans on the (universal) scope. 
No actual logic has been added to actually 
support setting spans on the scope itself.

The focus of this is to begin including tracing 
info in the context on all events if there is a 
transaction set on the scope. It does this fairly 
naively right now as the tooling to merge 
`sentry_value_t`s are basically nonexistent.

* ci: Make integration tests capable of reading the non-backwards compatible version number for Big Sur (getsentry#627)

* feat(tracing): Basic transaction context creation (getsentry#619)

This adds in the ability to create and manipulate transaction contexts as defined in 
https://develop.sentry.dev/sdk/performance/#new-span-and-transaction-classes, 
under Transaction Interface.

Instead of defining several transaction constructor functions with varying names 
(since overloading doesn't exist), the decision has been made to have the user 
construct an "inactive" transaction which should be fed into the SDK's 
implementation of `start_transaction`. This follows an existing pattern in the SDK 
where exceptions, threads, messages, etc can be constructed but they must be 
explicitly added to an event to be sent to sentry.

* feat(tracing): Support basic sampling of transactions (getsentry#620)

If an event is a transaction, event flushing should determine 
discard or forward the transaction to sentry based on the
sample rate as configured in sentry options. Follows the 
sampling rules as defined in 
https://develop.sentry.dev/sdk/performance/#sampling-context.

This does not take into consideration parent sampling as 
that property is currently unimplemented on the transaction 
context.

* feat(tracing): Introduce a helper that identifies events that are transactions (getsentry#628)

* feat(tracing): Restrict `sentry_capture_event` so it only sends non-transaction events (getsentry#629)

Prevent the public API from being used to send transaction events
as another transaction-specific function is meant to be used to 
accomplish this.

* fix: Avoid deadlocks with uninitialized options (getsentry#639)

The `SENTRY_WITH_OPTIONS_MUT` was a footgun since it never unlocked when
the options were NULL (uninitialized).
This removes the macro and replaces its uses with explicit lock/unlock calls.

* feat(tracing): Add in basic Envelope support for Transactions (getsentry#630)

* feat(tracing): Allow manual creation and sending of spanless Transactions (getsentry#631)

* feat(tracing): Defer some transaction validation and allow creation of internal spans (getsentry#633)

Co-authored-by: relaxolotl <[email protected]>
Co-authored-by: Sebastian Zivota <[email protected]>
Co-authored-by: getsentry-bot <[email protected]>
Co-authored-by: Arpad Borsos <[email protected]>
Co-authored-by: Arpad Borsos <[email protected]>

Co-authored-by: Tor Arne Vestbø <[email protected]>
Co-authored-by: Arpad Borsos <[email protected]>
Co-authored-by: Luke Street <[email protected]>
Co-authored-by: getsentry-bot <[email protected]>
Co-authored-by: Sentry Bot <[email protected]>
Co-authored-by: Arpad Borsos <[email protected]>
Co-authored-by: bschatt <[email protected]>
Co-authored-by: Burak Yigit Kaya <[email protected]>
Co-authored-by: MikeRumplerSentry <[email protected]>
Co-authored-by: Mischa Alff <[email protected]>
Co-authored-by: Michał Janiszewski <[email protected]>
Co-authored-by: getsentry-bot <[email protected]>
Co-authored-by: Gerhard Herbert <[email protected]>
Co-authored-by: andrei-mu <[email protected]>
Co-authored-by: Andrei Muraru <[email protected]>
Co-authored-by: pastdue <[email protected]>
Co-authored-by: Roshan Padaki <[email protected]>
Co-authored-by: mjvankampen <[email protected]>
Co-authored-by: Floris Bruynooghe <[email protected]>
Co-authored-by: Calvin Buckley <[email protected]>
Co-authored-by: Ladislav <[email protected]>
Co-authored-by: Mikhail Paulyshka <[email protected]>
Co-authored-by: pull[bot] <39814207+pull[bot]@users.noreply.github.com>
Co-authored-by: relaxolotl <[email protected]>
Co-authored-by: Sebastian Zivota <[email protected]>
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

Successfully merging a pull request may close this issue.

2 participants