Re: [Qemu-devel] Signal management in qemu-user

2012-05-24 Thread Alex Barcelo
On Thu, May 24, 2012 at 1:04 AM, Peter Maydell wrote: > On 23 May 2012 23:38, Alex Barcelo wrote: >> This *always* goes wrong without calling the signal handler > > I haven't looked too closely, but I suspect we're just not > paying any attention to whether memory does or doesn't have > the PROT_

Re: [Qemu-devel] Signal management in qemu-user

2012-05-23 Thread Peter Maydell
On 23 May 2012 23:38, Alex Barcelo wrote: > This *always* goes wrong without calling the signal handler I haven't looked too closely, but I suspect we're just not paying any attention to whether memory does or doesn't have the PROT_EXEC permission when we translate code from it. This is the kind

Re: [Qemu-devel] Signal management in qemu-user

2012-05-23 Thread Andreas Färber
Am 24.05.2012 00:38, schrieb Alex Barcelo: >>> Running it in a i386 machine works and gives an output of "0x0d\n0x20". >>> Running it in a qemu-i386 segfaults. Because the self-modifying code >>> raises a SIGSEGV in the qemu (I understand that it is the method used by >>> qemu to handle self-modify

Re: [Qemu-devel] Signal management in qemu-user

2012-05-23 Thread Alex Barcelo
>> Running it in a i386 machine works and gives an output of "0x0d\n0x20". >> Running it in a qemu-i386 segfaults. Because the self-modifying code >> raises a SIGSEGV in the qemu (I understand that it is the method used by >> qemu to handle self-modifying code). But the sigprocmask disables the >>

Re: [Qemu-devel] Signal management in qemu-user

2012-05-17 Thread Andreas Färber
Am 17.05.2012 11:23, schrieb Alex Barcelo: > Running it in a i386 machine works and gives an output of "0x0d\n0x20". > Running it in a qemu-i386 segfaults. Because the self-modifying code > raises a SIGSEGV in the qemu (I understand that it is the method used by > qemu to handle self-modifying code

Re: [Qemu-devel] Signal management in qemu-user

2012-05-17 Thread Andreas Färber
Am 17.05.2012 15:42, schrieb Peter Maydell: > On 17 May 2012 14:33, Andreas Färber wrote: >> Am 17.05.2012 11:23, schrieb Alex Barcelo: >>> Running it in a i386 machine works and gives an output of "0x0d\n0x20". >>> Running it in a qemu-i386 segfaults. Because the self-modifying code >>> raises a

Re: [Qemu-devel] Signal management in qemu-user

2012-05-17 Thread Peter Maydell
On 17 May 2012 14:33, Andreas Färber wrote: > Am 17.05.2012 11:23, schrieb Alex Barcelo: >> Running it in a i386 machine works and gives an output of "0x0d\n0x20". >> Running it in a qemu-i386 segfaults. Because the self-modifying code >> raises a SIGSEGV in the qemu (I understand that it is the m

[Qemu-devel] Signal management in qemu-user

2012-05-17 Thread Alex Barcelo
I'm working in a "big" (=complex, strange) project[1] and come across a bug in signal management. I have been able to narrow it down to this program: #include #include #include #include #include #include unsigned char *testfun; int main ( void ) { unsigned int ra; testfun=memalign(