make check_no_exec() work reliable

Peter Beutner p.beutner at gmx.net
Thu Nov 30 12:03:47 CST 2006


Alexandre Julliard wrote:
> Peter Beutner <p.beutner at gmx.net> writes:
> 
>> Peter Beutner wrote:
>>> Before starting to make this whole noexecute override behaviour configurable,
>>> it first must work reliable. In its current form there is no guarantee that
>>> the check_no_exec() function is actually called, because any other installed
>>> exception handler might decide to handle the exception itself.
>>> And as seen by the number of failing applications, this seems to happen
>>> quite a lot.
>>> This patch therefore makes check_no_exec() to be called before any other
>>> exception handler.
>>>
>>> ---
>> Any comments what is wrong with this one?
> 
> If the exception is not made visible to the app then there is no point
> in having one at all, we might just as well turn off the protection
> right away.
Why should this exception be visible to the application?
Plus if you make it visible, you can just forget this whole workaround idea,
because it won't work reliable anyways.

And remembering the last discussion I thought "just turning off the protection"
wasn't your preferred solution either.

> What really needs to be done is to investigate the Windows
> behavior and determine which parts of the app memory should be
> protected and which shouldn't, depending on the exe flags etc. and
> then replicate that behavior.
> 
Certainly some more testing on windows is needed, but this
check_no_exec() workaround was regardless introduced a long time ago.
This patch just fixes this workaround.
Otherwise it could as well be removed at all.



More information about the wine-devel mailing list