Possible bug in sysdeps/unix/sysv/linux/powerpc/mmap64.c

Ulrich Drepper drepper@redhat.com
Sat May 19 16:05:00 GMT 2001


"H . J . Lu" <hjl@lucon.org> writes:

> Here is a proposed patch.

Unless somebody who's responsible for the kernel part that the page
size can be changed there is no need for a patch like this.  If it is
agreed on that it is necessary this

> +  if (!page_size)
>      {
> +      page_size = __getpagesize ();
> +      page_shift = __ffs (page_size) - 1;
> +    }
> +
> +  if (offset & (page_size - 1))

should be rewritten to store the page size minus one in a variable
instead of computing it every time again.

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



More information about the Libc-alpha mailing list