hi there,

just a little mmap(2) related question. running the following code causes a
segfault:

mmap( (void*)0x1000, 0x80047000, PROT_NONE, MAP_ANON|MAP_FIXED, -1, 0 );

while the following doesn't:

mmap( (void*)0x1000, 0xffffffff, PROT_NONE, MAP_ANON|MAP_FIXED, -1, 0 );

is this a known problem? seems reproducible on all branches.

cheers
alex
#include <sys/mman.h>
#include <stdlib.h>
#include <stdio.h>

int main()
{
        printf("mmap: %p\n", mmap( (void*)0x1000, 0xffffffff, PROT_NONE, 
MAP_ANON|MAP_FIXED, -1, 0 ));
        printf("mmap: %p\n", mmap( (void*)0x1000, 0x80047000, PROT_NONE, 
MAP_ANON|MAP_FIXED, -1, 0 ));

        return 0;
}
_______________________________________________
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"

Reply via email to