Esme Povirk (@madewokherd) commented about dlls/uiautomationcore/tests/uiautomation.c:
- VariantClear(&v);
- SET_EXPECT(Accessible_get_accState);
- SET_EXPECT(Accessible_accLocation);
- hr = IRawElementProviderSimple_GetPropertyValue(elprov, UIA_IsOffscreenPropertyId, &v);
- ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
- ok(V_VT(&v) == VT_BOOL, "V_VT(&v) = %d\n", V_VT(&v));
- ok(check_variant_bool(&v, TRUE) || /* Win10v1809 32-bit returns FALSE here for some reason. */
broken(is_win10_1809_or_above && (sizeof(void *) == 4) && check_variant_bool(&v, FALSE)),
"Unexpected BOOL %#x\n", V_BOOL(&v));
- CHECK_CALLED(Accessible_get_accState);
- CHECK_CALLED(Accessible_accLocation);
- IRawElementProviderSimple_Release(elprov);
- ok(Accessible.ref == 1, "Unexpected refcnt %ld\n", Accessible.ref);
- DestroyWindow(hwnd);
This is a double-free of hwnd. I also don't think the test for a destroyed window is necessary. Nothing can be expected to work in that situation.