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

Ulrich Drepper drepper@redhat.com
17 Nov 2000 09:09:10 -0800


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().

-- 
---------------.                          ,-.   1325 Chesapeake Terrace
Ulrich Drepper  \    ,-------------------'   \  Sunnyvale, CA 94089 USA
Red Hat          `--' drepper at redhat.com   `------------------------