[2/3] ntdll: fill unused tails of heap blocks if HEAP_FREE_CHECKING_ENABLED (take 3)

Dan Kegel dank at kegel.com
Fri Jan 8 08:41:57 CST 2010

On Fri, Jan 8, 2010 at 2:08 AM, Alexandre Julliard <julliard at winehq.org> wrote:
>> To check whether we're too early in process setup to
>> check global flags, I compare the arguments of RtlCreateHeap
>> with the ones used by the call in virtual_init().  This is
>> not especially clean, but I couldn't think of anything
>> better.  I can hear Alexandre hitting the 'd' key already,
>> so if anyone has a better idea, please let me know.
> That's a sure hint that you shouldn't have submitted the patch. As I
> told you on IRC, you have to make the patch the best you possibly can
> *before* showing it to me. That's doubly true for a patch that has
> already seen several rounds. If you truly can't find a better way you
> can always ask for suggestions on IRC or wine-devel. Submitting broken
> patches (worse, that you already know are broken) is only going to make
> it harder for you to get anything in.

Posting a working if suboptimal implementation
is a clear way of framing questions sometimes,
but I guess when I do that it should be to wine-devel.

Maybe what we want is a safe implementation of RtlGetNtGlobalFlags(), one
that returns zero if it's not safe to call NtCurrentTeb().
We could store the global flags in a plain old global variable,
and copy it in to the peb but never reference it there, I suppose.
Would that be clean enough for you?  Or is that still too kludgy?
- Dan

More information about the wine-devel mailing list