This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/2007] mmap seg faults on marginally improper arguments
- From: "bkorb at gnu dot org" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: 27 Dec 2005 01:21:52 -0000
- Subject: [Bug libc/2007] mmap seg faults on marginally improper arguments
- References: <20051208233503.2007.bkorb@gnu.org>
- Reply-to: sourceware-bugzilla at sourceware dot org
------- Additional Comments From bkorb at gnu dot org 2005-12-27 01:21 -------
Subject: Re: mmap seg faults on marginally improper arguments
mv at binarysec dot com wrote:
> When i see MAP_ANONYMOUS|MAP_FIXED|MAP_SHARED i say to me that you miss understanding the
> mmap() behavior (no offence).
When I see this response, it seems like the bug report was not carefully read.
I completely acknowledge the fact that the input flags are inconsistent.
The issue is whether or not it is appropriate for mmap to segfault because
of that, or if it should return ((void*)-1). Segfaults with often incomprehensible
stack traces are much harder to figure out than an EINVAL error return.
I've fixed my code and I promise I will never make another cut-n-paste
error ever again. ;-) Meanwhile, it would be nice to future typo-prone
users to make the error response more friendly than a seg fault.
Thanks - Bruce
--
http://sourceware.org/bugzilla/show_bug.cgi?id=2007
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.