DragonFly BSD
DragonFly bugs List (threaded) for 2010-04
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

[issue1723] mmap() MAP_ANON honors offset


From: "Venkatesh Srinivas \(via DragonFly issue tracker\)" <sinknull@xxxxxxxxxxxxxxxxxxxxx>
Date: Sun, 11 Apr 2010 10:34:17 +0000

New submission from Venkatesh Srinivas <me@acm.jhu.edu>:

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

int main(int argc, char *argv[]) {
        char *c = mmap(NULL, 4096, PROT_READ | PROT_WRITE, MAP_PRIVATE | 
MAP_ANON, -1, 16);
        return printf("%x \n", c);
}

gets an address of xxxxx010. mmap is supposed to fail with EINVAL given an 
offset and MAP_ANON.

Patch here: http://endeavour.zapto.org/dfly/mmap_anon_offset.diff

----------
messages: 8451
nosy: vsrinivas
status: unread
title: mmap() MAP_ANON honors offset

_____________________________________________________
DragonFly issue tracker <bugs@lists.dragonflybsd.org>
<http://bugs.dragonflybsd.org/issue1723>
_____________________________________________________




[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]