On 9/19/23 10:26, Michael Tokarev wrote:
19.09.2023 11:00, Helge Deller wrote:
..
Probably the right solution is to use qemu_abort() (and qemu_assert() etc),
and maybe #define abort(x) qemu_abort(x). Even if some way to redefine
abort like the above will work on glibc, it does not mean it will work
on *bsd and in other contexts.
True. That's probably the better solution.
That wont work, since abort() gets called from a lot of libraries
(gilbc has 1000s of calls to it)
Sigh.
/mjt
A possible solution that occurs to me is to treat SIGABRT like patch 7 of this
patch set treats SIGPROF: remap the guest signal to one of the host RT signals.
Then we leave the host SIGABRT as SIG_DFL, producing the expected crash when
the signal originates from a host abort() (etc). A guest abort() would use a
different signal which is caught and emulated.
Things do get confusing across processes, but should be no worse than any of
the existing signal number swizzling.
Thoughts?