https://bugs.winehq.org/show_bug.cgi?id=51131
--- Comment #2 from Dmitry Timoshkov dmitry@baikal.ru --- (In reply to Dmitry Timoshkov from comment #1)
It looks like simply calling IXMLDOMNamedNodeMap_getNamedItem(node_map, _bstr_("anything"), &item); is guaranteed to cause heap corruption in the 64-bit test under testbot VMs. It doesn't matter what's that "anything": bogus attribute or real thing like "encoding".
Also, I couldn't reproduce this when building locally 32-bit or 64-bit domdoc tests using Windows 10 PSDK with Visual Studio 14.0 and 64-bit Windows 10 20H2 on a real hardware, there's no crashes or heap corruption on exit.
That might be a bug in 64-bit msxml3.dll that was fixed in one of updates, or this might be related to a way testbot builds 64-bit tests. Currently I have no other insights on the problem.
While further investigating this and playing with the tests I've found that moving test_ProcessingInstarution() before all other tests helps to avoid the crashes. Since I don't see anything wrong with the tests, and I didn't find another ways to avoid crashes, probably that's what I'll stick with for now.