TBH, this looks more like a compiler bug than anything else.
I tend to agree. Especially since valgrind has no complaints on x64 linux, and neither does DrMemory for 32-bit builds with the same toolchain on the same Windows and same SDK.
I don't see any particular reason we can't proceed with 9.6beta2 and build x64 Pg with MS VS 2015. There's no evidence turning up of a Pg bug here, and compiling with a different toolchain gets us working binaries for the target platform in question.
It would be worth recompiling at -O0, or whatever the local equivalent of that is, to see if (1) the crash goes away or (2) the debugger's printouts get any more reliable
Yeah, it probably is. I'll see if I can find time this w/e.