diff --git a/CHANGELOG.md b/CHANGELOG.md index 74678cd..3f50217 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,36 @@ # Changelog +## 0.2.3 + +### Important upgrade notice + +All `0.2.x` versions prior to this one were affected by a bug that could +potentially lead to serious data-loss on Windows platforms. We encourage +everyone to update as quickly as possible. +See [#220](https://github.com/getsentry/sentry-native/issues/220) for details. + +### Deprecations + +- `sentry_transport_t` will be replaced by an opaque struct with setter methods + in a future release. +- `sentry_backend_free` and `sentry_backend_t` are deprecated and will be + removed in a future release. + +### Other changes + +- Further improvements to the cmake build system (huge thanks to @madebr + [#207](https://github.com/getsentry/sentry-native/pull/207)) +- Improved support for older Windows versions, as low as Windows XP SP3 (thanks + to @Mixaill [#203](https://github.com/getsentry/sentry-native/pull/203), + @cammm [#202](https://github.com/getsentry/sentry-native/pull/202) and + @jblazquez [#212](https://github.com/getsentry/sentry-native/pull/212)) +- Improved documentation +- Cleaned up sentry database handling +- Added new `sentry_handle_exception` function to explicitly capture a crash + (thanks @cammm [#201](https://github.com/getsentry/sentry-native/pull/201)) +- Added new `sentry_clear_modulecache` function to clear the list of loaded + modules. Use this function when dynamically loading libraries at runtime. + ## 0.2.2 - Implement experimental Session handling @@ -9,7 +40,7 @@ submission on crash - `sentry_shutdown` will better clean up after itself - Add Experimental MinGW build support (thanks @Amphaal - [189](https://github.com/getsentry/sentry-native/pull/189)) + [#189](https://github.com/getsentry/sentry-native/pull/189)) - Various other fixes and improvements ## 0.2.1 diff --git a/README.md b/README.md index 36e9a50..37f8a7a 100644 --- a/README.md +++ b/README.md @@ -55,11 +55,16 @@ The SDK currently supports and is tested on the following OS/Compiler variations - 32bit Linux with GCC 7 (cross compiled from 64bit host) - 64bit Windows with MSVC 2019 - 32bit Windows with MSVC 2017 -- ~~64bit Windows with MSYS2 + MinGW + Clang~~ _(currently untested)_ - macOS Catalina with most recent Compiler toolchain - Android API29 built by NDK21 toolchain - Android API16 built by NDK19 toolchain +Additionally, the SDK should support the following platforms, although they are +not automatically tested, so breakage may occur: + +- Windows Versions lower than Windows 10 / Windows Server 2016 +- Windows builds with the MSYS2 + MinGW + Clang toolchain + The SDK supports different features on the target platform: - **HTTP Transport** is currently only supported on Windows and platforms that @@ -118,20 +123,25 @@ using `cmake -D BUILD_SHARED_LIBS=OFF ..`. - `BUILD_SHARED_LIBS` (Default: ON): By default, `sentry` is built as a shared library. Setting this option to `OFF` will build `sentry` as a static library instead. - -- `CMAKE_SYSTEM_VERSION`: (Default: depending on Windows SDK version): - Sets up a minimal version of Windows where sentry-native can be guaranteed to run. - Possible values: - - `5.1` (Windows XP) - - `5.2` (Windows XP 64-bit / Server 2003 / Server 2003 R2) - - `6.0` (Windows Vista / Server 2008) - - `6.1` (Windows 7 / Server 2008 R2) - - `6.2` (Windows 8.0 / Server 2012) - - `6.3` (Windows 8.1 / Server 2012 R2) - - `10` (Windows 10 / Server 2016 / Server 2019) - ​ For Windows versions below than `6.0` it is also necessary to use XP toolchain in case of MSVC compiler (pass `-T v141_xp` to CMake command line). - Also, you are not able to use Crashpad with XP toolchains, no crashes will be handled at all. +- `SENTRY_PIC` (Default: ON): + By default, `sentry` is built as a position independent library. + +- `CMAKE_SYSTEM_VERSION`: (Default: depending on Windows SDK version): + Sets up a minimal version of Windows where sentry-native can be guaranteed to run. + Possible values: + + - `5.1` (Windows XP) + - `5.2` (Windows XP 64-bit / Server 2003 / Server 2003 R2) + - `6.0` (Windows Vista / Server 2008) + - `6.1` (Windows 7 / Server 2008 R2) + - `6.2` (Windows 8.0 / Server 2012) + - `6.3` (Windows 8.1 / Server 2012 R2) + - `10` (Windows 10 / Server 2016 / Server 2019) + + For Windows versions below than `6.0` it is also necessary to use XP toolchain + in case of MSVC compiler (pass `-T v141_xp` to CMake command line). + Also, you are not able to use Crashpad with XP toolchains, no crashes will be handled at all. - `SENTRY_TRANSPORT` (Default: depending on platform): Sentry can use different http libraries to send reports to the server. @@ -185,6 +195,11 @@ Legend: ## Known Issues +- The SDK currently depends on the hosted version on + [sentry.io](https://sentry.io). The latest on-premise version of Sentry (10.0) + does not provide server-side support for events sent by `sentry-native`. + Full support for `sentry-native` will be made available to all on-premise + customers with the next release. - Attachments are currently in _Preview_ and may not be available to your organization. Please see [Event Attachments] for more information. diff --git a/include/sentry.h b/include/sentry.h index cbdbdc4..c5f6df2 100644 --- a/include/sentry.h +++ b/include/sentry.h @@ -14,7 +14,7 @@ extern "C" { /* SDK Version */ #define SENTRY_SDK_NAME "sentry.native" -#define SENTRY_SDK_VERSION "0.2.2" +#define SENTRY_SDK_VERSION "0.2.3" #define SENTRY_SDK_USER_AGENT (SENTRY_SDK_NAME "/" SENTRY_SDK_VERSION) /* common platform detection */ diff --git a/tests/assertions.py b/tests/assertions.py index e784aab..4dcd18a 100644 --- a/tests/assertions.py +++ b/tests/assertions.py @@ -19,9 +19,9 @@ def assert_meta(envelope): "extra": {"extra stuff": "some value", "…unicode key…": "őá…–🤮🚀¿ 한글 테스트"}, "sdk": { "name": "sentry.native", - "version": "0.2.2", + "version": "0.2.3", "packages": [ - {"name": "github:getsentry/sentry-native", "version": "0.2.2",}, + {"name": "github:getsentry/sentry-native", "version": "0.2.3",}, ], }, } diff --git a/tests/test_integration_http.py b/tests/test_integration_http.py index 5a5ce03..a8e8423 100644 --- a/tests/test_integration_http.py +++ b/tests/test_integration_http.py @@ -17,16 +17,17 @@ from .assertions import ( if not has_http: pytest.skip("tests need http", allow_module_level=True) +auth_header = ( + "Sentry sentry_key=uiaeosnrtdy, sentry_version=7, sentry_client=sentry.native/0.2.3" +) + def test_capture_http(tmp_path, httpserver): # we want to have the default transport cmake(tmp_path, ["sentry_example"], {"SENTRY_BACKEND": "none"}) httpserver.expect_oneshot_request( - "/api/123456/store/", - headers={ - "x-sentry-auth": "Sentry sentry_key=uiaeosnrtdy, sentry_version=7, sentry_client=sentry.native/0.2.2" - }, + "/api/123456/store/", headers={"x-sentry-auth": auth_header}, ).respond_with_data("OK") with httpserver.wait(raise_assertions=True, stop_on_nohandler=True) as waiting: @@ -58,10 +59,7 @@ def test_inproc_crash_http(tmp_path, httpserver): assert child.returncode # well, its a crash after all httpserver.expect_oneshot_request( - "/api/123456/store/", - headers={ - "x-sentry-auth": "Sentry sentry_key=uiaeosnrtdy, sentry_version=7, sentry_client=sentry.native/0.2.2" - }, + "/api/123456/store/", headers={"x-sentry-auth": auth_header}, ).respond_with_data("OK") with httpserver.wait(raise_assertions=True, stop_on_nohandler=True) as waiting: @@ -90,10 +88,7 @@ def test_inproc_dump_inflight(tmp_path, httpserver): cmake(tmp_path, ["sentry_example"], {"SENTRY_BACKEND": "inproc"}) httpserver.expect_request( - "/api/123456/store/", - headers={ - "x-sentry-auth": "Sentry sentry_key=uiaeosnrtdy, sentry_version=7, sentry_client=sentry.native/0.2.2" - }, + "/api/123456/store/", headers={"x-sentry-auth": auth_header}, ).respond_with_data("OK") env = dict(os.environ, SENTRY_DSN=make_dsn(httpserver)) @@ -114,10 +109,7 @@ def test_breakpad_crash_http(tmp_path, httpserver): assert child.returncode # well, its a crash after all httpserver.expect_oneshot_request( - "/api/123456/store/", - headers={ - "x-sentry-auth": "Sentry sentry_key=uiaeosnrtdy, sentry_version=7, sentry_client=sentry.native/0.2.2" - }, + "/api/123456/store/", headers={"x-sentry-auth": auth_header}, ).respond_with_data("OK") with httpserver.wait(raise_assertions=True, stop_on_nohandler=True) as waiting: @@ -146,10 +138,7 @@ def test_breakpad_dump_inflight(tmp_path, httpserver): cmake(tmp_path, ["sentry_example"], {"SENTRY_BACKEND": "breakpad"}) httpserver.expect_request( - "/api/123456/store/", - headers={ - "x-sentry-auth": "Sentry sentry_key=uiaeosnrtdy, sentry_version=7, sentry_client=sentry.native/0.2.2" - }, + "/api/123456/store/", headers={"x-sentry-auth": auth_header}, ).respond_with_data("OK") env = dict(os.environ, SENTRY_DSN=make_dsn(httpserver))