On Mon Mar 3 11:43:45 2025 +0000, Edward OC wrote:
btw "extra runtime checks" on validating user controlled pointers to a API is a completely irreverent nano-optimisation, CPU's have branch-predictors. Fixing the oleaut32 implementation from O(n^3) strcmp() lookups to a hashmap, which is how it is meant to work, is far more relevant. If you are worried about branch-complexity, the other patches I sent in that reduce cyclomatic branch complexity help the `if (true) { if (true) { if (true` cascades because base-conditions are not quickly interrogated and returned from.
"Validating" pointers doesn't fix anything, it only serves to hide bugs. Yes, Microsoft does add code to hide bugs in many cases, which is why Windows apps are so broken.
In Wine we want to make sure that the bugs get fixed, so we don't hide them unless it's necessary. There's nothing useful to gain by calling QueryInterface with a NULL pointer, so if an app does this, it's usually a sign that something else went wrong. That's what needs to be investigated and fixed, instead of hiding the bug.
Additionally I sent in a patch last week that fixes a regression made to oleaut32 that occured in the last couple of weeks, totally ignored.
I haven't seen any patch of yours that mentioned fixing a regression, much less which regression. I've seen a dozen oleaut32 patches that are mostly moving code around and renaming variables, it's impossible to tell if there was a valid bug fix buried in there.