Quiet valgrind warnings in init_current_teb

Mike Hearn mike at plan99.net
Sat May 13 17:11:50 CDT 2006


Hmm, are you sure this isn't a bug in Valgrind itself? The code it's
warning on is this:

inline static void wine_ldt_set_limit( LDT_ENTRY *ent, unsigned int limit )
{
    if ((ent->HighWord.Bits.Granularity = (limit >= 0x100000))) limit >>= 12;
    ent->LimitLow = (WORD)limit;
    ent->HighWord.Bits.LimitHi = (limit >> 16);
}

but unless I'm reading it wrong this is not testing ent
before initialization at all, it's testing limit, assigning to ent, then
testing the result of that assignment ... which seems to be valid.

Of course, working around bugs in Valgrind may be a useful thing to do for
now ... that code is seriously terrifying stuff. And I thought Wine was
scary :)

thanks -mike




More information about the wine-devel mailing list