linuxolator: amd64 Linux Test Project failures

Scot Hetzel swhetzel at gmail.com
Sat Dec 30 19:55:38 PST 2006


I think I found the problem,  I had wrongly assumed that the code was
using (char *)-1 as the address to pass to the function.  Instead the
code in access03, is using mmap to assign an address to variable
bad_address.

Below is the test program that shows that the problem is in mmap.

Scot

#include <errno.h>
#include <string.h>
#include <signal.h>

#include <unistd.h>
#include <sys/mman.h>

int
main()
{
   char * bad_addr;

   access((char *)-1, 0);
   bad_addr = mmap(0, 1, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, 0, 0);
   printf("bad_addr = %p\n", bad_addr);
   access(bad_addr, 0);
   return(0);
}

hp010 / # gcc t1.c -o t1
hp010 / # ./t1
bad_addr = 0x2805e000
hp010 / # exit
exit

Dec 30 21:47:11 hp010 kernel: linux(1565): access(Checking if path
[0xffffffffffffffff/0xffffffffa3b5abe0/0xffffffff] exists)
Dec 30 21:47:11 hp010 kernel: kern_alternate_path: error = 14, path =
0xffffffffa3b5a980
Dec 30 21:47:11 hp010 kernel: linux(1565): access(Checking if path
[0xffffffffffffffff/0xffffffffa3b5abe0/0x2805e000] exists)
Dec 30 21:47:11 hp010 kernel: kern_alternate_path: error = 0, path =
0xffffffffa3b5a980


More information about the freebsd-emulation mailing list