Are you compiling with optimisation? I'm wondering if it could be because the compiler may be ignoring ABI conformance for the purposes of debuggability at -O0.
-O0