There is some debugging code in cxa_demangle.cpp that prints messages on stdout. In general this is not safe, as the program itself may use stdout to write its output. Change this code to write to stderr.
Testing has revealed that this code is actually not reachable. Maybe it would make sense to remove it instead?