a buggy mmap implementation