On a whim, I decided to install the Hercules s390 emulator and see if I could reproduce the problem there. It's slow (4+ hours to do a build of xerces) but it appears to work, and the issue shows up there as well.
I started trying to trace down the memory issue in real time, but the variables I needed to inspect had been optimized out. As it turns out, building with reduced/no optimization (I tested both -O1 and -O0) allows all of the tests to pass except for one (XSValueTest). Can someone please confirm this on the porterbox? Adding export DEB_BUILD_MAINT_OPTIONS=noopt to the top of d/rules and rebuilding should do it. Thanks!