[Bug libgcc/103510] _Unwind_GetGR crashed for uninitialized registers
ashimida at linux dot alibaba.com
gcc-bugzilla@gcc.gnu.org
Wed Dec 1 06:56:02 GMT 2021
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103510
--- Comment #1 from ashimida <ashimida at linux dot alibaba.com> ---
For example, such a c code works find in clang with libunwind,
and will cause a crash in gcc with libgcc in aarch64.
#include <stdio.h>
#include <stdlib.h>
#include <unwind.h>
_Unwind_Reason_Code callback(struct _Unwind_Context *context, void *args)
{
printf("Unwind Frame X0:%016lx\n", _Unwind_GetGR(context, 0));
return _URC_NO_REASON;
}
int main(void)
{
_Unwind_Backtrace(callback, NULL);
return 0;
}
More information about the Gcc-bugs
mailing list