http://bugs.winehq.org/show_bug.cgi?id=10282
--- Comment #10 from Alexandre Julliard julliard@winehq.org 2007-11-05 04:46:33 --- (In reply to comment #9)
(In reply to comment #8)
(In reply to comment #7)
No need to emulate anything because when an application does such mmap system call then the driver returns ENODEV which can be easily handled. See mmap(2).
It can't really be handled, all we can do is report the failure to the app,
This is exactly what I have meant. You should report this to the app instead of crashing.
This is *exactly* what we do.
which in most cases will crash since the app doesn't expect it.
That's a problem in the app.
Sure, but we can't fix the app.
Crash is not a nice way to terminate applications when it would be possible to handle such errors more elegantly and providing useful information to the user to fix his problem without any developer involvment.
I think you greatly underestimate the difficulty of the problem. How can we determine that an app crash is due to the lack of writable mmap and not to another of a gazillion possible causes?
So, this indeed seems to be a mount configuration problem and sometimes mmapping files for execution is denied. 'exec' is not a missing functionality but it's denied due to security reasons in certain mount scenarios.
Nevertheless wine shouldn't crash if it's possible but report such errors to the user, so they would have a chance to fix the issue themself.
Here too, there are about a gazillion different scenarios that can lead to a no-exec page fault. We do have a number of workarounds for it, but depending on the system configuration they can't always help.