Look like https://bugs.launchpad.net/bugs/1570055 is the same bug (or at least related) and the bug is in glibs. 1) segfault during program exit in _IO_wsetb after output to stdout 2) same platform powerpc, same glibs version 2.23 but not related to freepascal.