Improve backtraces

We're now able to rewind the instruction pointer in x86 backtraces. This
helps ensure addr2line cannot print information about unrelated adjacent
code. I've restored -fno-schedule-insns2 in most cases because it really
does cause unpredictable breakage for backtraces.
This commit is contained in:
Justine Tunney 2024-05-30 15:11:45 -07:00
parent cd672e251f
commit 9b6718ac99
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
11 changed files with 118 additions and 24 deletions

View file

@ -539,16 +539,13 @@ typedef struct {
#ifdef __x86_64__
#define notpossible \
do { \
__asm__("nop\n\t" \
"ud2\n\t" \
"nop"); \
__asm__("ud2"); \
__builtin_unreachable(); \
} while (0)
#elif defined(__aarch64__)
#define notpossible \
do { \
__asm__("udf\t#0\n\t" \
"nop"); \
__asm__("udf\t#0"); \
__builtin_unreachable(); \
} while (0)
#else