Thanks to a missing `-` sign, we were returning garbage rather than
indicating that the memory region in question was inaccessible. This
mainly affects register dumps (since that's the time we expect to have
to cope with out-of-bounds reads).
rdar://117900760
We have two stacks that we set up during crash handling, both of
which were potentially misaligned. This only tripped us up on
Ubuntu 20.04 on aarch64 - my guess is that maybe `clone()` aligns
the stack pointer on newer kernels which is why we didn't see it
on 22.04.
rdar://110743884
These seem to be related to signal handling issues in threads that
have been started presumably by the C library or some other library.
Primarily this appears to affect Ubuntu 20.04 on aarch64, though I
have seen sporadic issues on 18.04 as well.
We address the problem by making the thread suspension mechanism
more robust in the face of threads with masked signals.
rdar://110653167
Mike and Max made various helpful suggestions, so I've added and updated
various comments and amended the code to cope with partial reads and
writes.
rdar://110261430
This also adds a function to demangle a symbol, and a way for the
backtracing code to report warning messages to the same place as
the main runtime.
I'd like to rename the _swift_isThunkFunction() SPI also, but we
can't do that until we've made the changes to the _Backtracing
library, so we'll do that there instead.
rdar://110261430