We were passing an argument less than 4K to the MAP_ALIGNED macro, which caused an undefined shift. The compiler helpfully propagated the undef values back to earlier in the code and gave us some exciting nonsense.