Date: Wed, 21 Oct 2009 03:41:14 +0200 (CEST) From: Alexander Best <alexbestms@math.uni-muenster.de> To: <freebsd-hackers@FreeBSD.org> Subject: mmap(2) segaults with certain len values and MAP_ANON|MAP_FIXED Message-ID: <permail-2009102101411480e26a0b00003712-a_best01@message-id.uni-muenster.de>
next in thread | raw e-mail | index | archive | help
This is a MIME encoded multipart message. --+permail-2009102101411480e26a0b00003712-a_best01+ Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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 --+permail-2009102101411480e26a0b00003712-a_best01+ Content-Type: text/plain Content-Transfer-Encoding: Base64 Content-Disposition: attachment; filename="mmaptest.c.txt" I2luY2x1ZGUgPHN5cy9tbWFuLmg+CiNpbmNsdWRlIDxzdGRsaWIuaD4KI2luY2x1ZGUgPHN0ZGlv Lmg+CgppbnQgbWFpbigpCnsKCXByaW50ZigibW1hcDogJXBcbiIsIG1tYXAoICh2b2lkKikweDEw MDAsIDB4ZmZmZmZmZmYsIFBST1RfTk9ORSwgTUFQX0FOT058TUFQX0ZJWEVELCAtMSwgMCApKTsK CXByaW50ZigibW1hcDogJXBcbiIsIG1tYXAoICh2b2lkKikweDEwMDAsIDB4ODAwNDcwMDAsIFBS T1RfTk9ORSwgTUFQX0FOT058TUFQX0ZJWEVELCAtMSwgMCApKTsKCglyZXR1cm4gMDsKfQo= --+permail-2009102101411480e26a0b00003712-a_best01+--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?permail-2009102101411480e26a0b00003712-a_best01>