Author matejcik
Recipients matejcik
Date 2014-01-22.18:59:06
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
When compiling "make profile-opt", the instrumented python executable segfaults upon exit, even though it appears to run fine.

This breaks the build process, because make evaluates the segfault as if the respective compilation step failed.

GDB yields the following backtrace for the crash:

#0  gcov_exit () at ../../../libgcc/libgcov.c:397
#1  0x00007ffff69b875f in __cxa_finalize (d=0x7ffff7c38a60) at cxa_finalize.c:56
#2  0x00007ffff771b983 in __do_global_dtors_aux () from ./
#3  0x00007fffffffdd60 in ?? ()
#4  0x00007ffff7debe6a in _dl_fini () at dl-fini.c:252
Backtrace stopped: frame did not save the PC

This problem first appears with changeset 6e2089dbc5ad [1] that introduced tracemalloc. It is still reproducible on today's tip.

AFAICT, the mere presence of tracemalloc in the compiled executable causes this crash; I tried commenting out _PyTraceMalloc_Init from pythonrun.c and it did not help.

To reproduce:
./configure --enable-shared
make profile-opt

i'm on x86_64 SUSE Linux, gcc version is 4.8.1

Date User Action Args
2014-01-22 18:59:07matejciksetrecipients: + matejcik
2014-01-22 18:59:07matejciksetmessageid: <>
2014-01-22 18:59:07matejciklinkissue20354 messages
2014-01-22 18:59:06matejcikcreate