[PATCH] Use asserts for mmap failure modes
mgilbert at debian.org
Sun Jul 26 09:13:34 CDT 2015
On Sun, Dec 21, 2014 at 11:00 AM, Chris Robinson wrote:
> On 12/20/2014 10:43 PM, Michael Gilbert wrote:
>> Using exit in shared libraries is a discouraged practice, and wine's
>> mmap implementation currently does that.
>> I attach a proposed change using asserts instead. Let me know if you
>> have any feedback.
> assert() can get compiled away to nothing in release builds, so release
> builds will fail to die in those error conditions. I also personally think
> it's better to use abort() instead of assert(0), since assert is intended to
> assert that a given run-time condition is true, else the process needs to
> abort. If the given condition is always false, there's no real reason to
> assert it; just abort instead.
I agree. Here is a revised patch using abort.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 3901 bytes
Desc: not available
More information about the wine-devel