[Bug 36670] New: valgrind shows invalid read/write in d3d8/tests/device.c