Re: [PATCH] Fix signal handler to detect crashes in qemu-linux-user

2023-08-12 Thread Richard Henderson
On 8/12/23 11:12, Helge Deller wrote: I did mention that you should look at adjust_signal_pc, Yes, you did. Maybe I was blind or didn't fully understood yet. which has a lot of commentary on the subject. (0) Place this after the write-protect and restart check just below, since that is not a

Re: [PATCH] Fix signal handler to detect crashes in qemu-linux-user

2023-08-12 Thread Helge Deller
* Richard Henderson : > On 8/12/23 09:43, Helge Deller wrote: > > +/* _init and _fini are provided by the linker */ > > +extern char _init; > > +extern char _fini; > > + > > static void host_signal_handler(int host_sig, siginfo_t *info, void *puc) > > { > > CPUArchState *env = thread_cpu-

Re: [PATCH] Fix signal handler to detect crashes in qemu-linux-user

2023-08-12 Thread Richard Henderson
On 8/12/23 09:43, Helge Deller wrote: +/* _init and _fini are provided by the linker */ +extern char _init; +extern char _fini; + static void host_signal_handler(int host_sig, siginfo_t *info, void *puc) { CPUArchState *env = thread_cpu->env_ptr; @@ -819,6 +848,13 @@ static void host_si

[PATCH] Fix signal handler to detect crashes in qemu-linux-user

2023-08-12 Thread Helge Deller
If there is an internal program error in the qemu source code which triggers a SIGSEGV, qemu will currently assume this is a SIGSEGV of the target and print: (hppa-chroot)root@p100:/# cat /proc/self/maps ** ERROR:../../home/cvs/qemu/qemu/accel/tcg/cpu-exec.c:532:cpu_exec_longjmp_cleanup: assertio