This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/2007] mmap seg faults on marginally improper arguments


------- 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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]