Merge pull request #11491 from akallabeth/unwind-ignore

[winpr,utils] ignore _Unwind_Backtrace return
This commit is contained in:
akallabeth
2025-04-11 08:26:18 +02:00
committed by GitHub
2 changed files with 8 additions and 4 deletions

View File

@@ -47,7 +47,7 @@ set(WITH_DEBUG_XV OFF CACHE BOOL "preload")
set(WITH_SAMPLE ON CACHE BOOL "preload")
set(WITH_NO_UNDEFINED ON CACHE BOOL "preload")
set(WITH_SANITIZE_ADDRESS OFF CACHE BOOL "preload")
set(USE_UNWIND OFF CACHE BOOL "preload")
set(USE_UNWIND ON CACHE BOOL "preload")
set(USE_EXECINFO OFF CACHE BOOL "preload")
set(WITH_FFMPEG ON CACHE BOOL "preload")
set(WITH_SWSCALE ON CACHE BOOL "preload")

View File

@@ -139,10 +139,14 @@ void* winpr_unwind_backtrace(DWORD size)
rc = _Unwind_Backtrace(unwind_backtrace_callback, ctx);
if (rc != _URC_END_OF_STACK)
{
/* https://github.com/FreeRDP/FreeRDP/issues/11490
*
* there seems to be no consensus on what to return from this function.
* so we just warn about unexpected return codes and return the context regardless.
*/
char buffer[64] = { 0 };
WLog_ERR(TAG, "_Unwind_Backtrace failed with %s",
unwind_reason_str_buffer(rc, buffer, sizeof(buffer)));
goto fail;
WLog_WARN(TAG, "_Unwind_Backtrace failed with %s",
unwind_reason_str_buffer(rc, buffer, sizeof(buffer)));
}
return ctx;