Bug#827243: [armhf] Miscompiles with -O2, throws deque::_M_new_elements_at_back
The mentioned version of g++ breaks the build of aspectc++ on the armhf
architecture, interestingly other architectures, including armel, are fine.
Please see the build log:
fatal: Caught standard exception: deque::_M_new_elements_at_back
I could manually reproduce this issue on harris.debian.org.
A little background on aspectc++: The program provides a source-to-source
compiler for AspectC++, an AOP extension for C++. It compiles from AspectC++ to
C++ and is implemented in AspectC++. The package first builds an ac++ binary,
and then uses that binary to "weave" the aspects in Puma. The issue is a
run-time error during the execution of the ac++ binary, and manifests in an STL
AFAIUI this run-time error is an internal error in the STL implementation that
should never happen. In GDB I could tack down the issue to some internal resize
operation in a std::deque container, which according to the C++ standard should
It appears that the issue does not occur when compiling with -O1 or -O0, but
does reliably occur with -O2. I did not try -O3.
I intend to upload a new package revision that sets -O1 on armhf only. This is
highly undesirable and I'd appreciate suggestions and alternate solution.