[parisc-linux] SEGV signal handling bug (dynamic linking)

Richard Hirst rhirst@linuxcare.com
Fri, 17 Nov 2000 17:38:18 +0000


On Fri, Nov 17, 2000 at 09:09:10AM -0800, Ulrich Drepper wrote:
> Richard Hirst <rhirst@linuxcare.com> writes:
> 
> >         mem = malloc(8192);
> >         if (mem == NULL) {
> >                 perror("malloc");
> >                 exit(1);
> >         }
> >         mem = (char *)(((int)mem + 4095) & ~0x0fff);
> >         res = mprotect(mem, 4096, PROT_READ);
> 
> Read the Unix standard:
> 
>   The behavior of this function is unspecified if the mapping was not
>   established by a call to mmap().

Yeh, but it works on m68k and i386, and works on hppa if statically
linked.  And the code is in an example on the mprotect man page on
my Mandrake7 box.

Richard