Here one more crash, a bit further down caught by glibc: $ gdb python GNU gdb (Gentoo 7.2 p1) 7.2 Copyright (C) 2010 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "i686-pc-linux-gnu". For bug reporting instructions, please see: ... Reading symbols from /usr/bin/python...done. (gdb) run tre-test.py Starting program: /usr/bin/python tre-test.py process 3648 is executing new program: /usr/bin/python2.6 [Thread debugging using libthread_db enabled] tre.Fuzzyness(delcost=1,inscost=1,maxcost=2147483647,subcost=1,maxdel=2147483647,maxerr=3,maxins=2147483647,maxsub=2147483647) ((111, 132),) gaaggcacncaggggataggn *** glibc detected *** /usr/bin/python2.6: free(): invalid pointer: 0x080be298 *** ======= Backtrace: ========= /lib/libc.so.6(+0x6ba41)[0xb7d5da41] /lib/libc.so.6(+0x6d2c0)[0xb7d5f2c0] /lib/libc.so.6(cfree+0x6d)[0xb7d623ad] /lib/libc.so.6(+0xa429a)[0xb7d9629a] /lib/libc.so.6(+0xa436d)[0xb7d9636d] /lib/libc.so.6(regfree+0x25)[0xb7d964f5] /usr/lib/python2.6/site-packages/tre.so(+0x14d3)[0xb7fde4d3] /usr/lib/libpython2.6.so.1.0(+0x5c287)[0xb7ec1287] /usr/lib/libpython2.6.so.1.0(PyDict_SetItem+0x87)[0xb7ec3b31] /usr/lib/libpython2.6.so.1.0(_PyModule_Clear+0x161)[0xb7ec5521] /usr/lib/libpython2.6.so.1.0(PyImport_Cleanup+0x3f3)[0xb7f2ac44] /usr/lib/libpython2.6.so.1.0(Py_Finalize+0x124)[0xb7f332cb] /usr/lib/libpython2.6.so.1.0(Py_Main+0x524)[0xb7f3f254] /usr/bin/python2.6(main+0x8e)[0x80487fe] /lib/libc.so.6(__libc_start_main+0xe6)[0xb7d08cc6] /usr/bin/python2.6[0x80486d1] ======= Memory map: ======== 08048000-08049000 r-xp 00000000 08:03 28655623 /usr/bin/python2.6 08049000-0804a000 r--p 00000000 08:03 28655623 /usr/bin/python2.6 0804a000-0804b000 rw-p 00001000 08:03 28655623 /usr/bin/python2.6 0804b000-080cd000 rw-p 0804b000 00:00 0 [heap] b7900000-b7921000 rw-p b7900000 00:00 0 b7921000-b7a00000 ---p b7921000 00:00 0 b7a40000-b7c40000 r--p 00000000 08:03 12124310 /usr/lib/locale/locale-archive b7c40000-b7cc3000 rw-p b7c40000 00:00 0 b7cc3000-b7ce7000 r-xp 00000000 08:03 24789884 /lib/libm-2.12.1.so b7ce7000-b7ce8000 r--p 00023000 08:03 24789884 /lib/libm-2.12.1.so b7ce8000-b7ce9000 rw-p 00024000 08:03 24789884 /lib/libm-2.12.1.so b7ce9000-b7ceb000 r-xp 00000000 08:03 25576874 /lib/libutil-2.12.1.so b7ceb000-b7cec000 r--p 00001000 08:03 25576874 /lib/libutil-2.12.1.so b7cec000-b7ced000 rw-p 00002000 08:03 25576874 /lib/libutil-2.12.1.so b7ced000-b7cee000 rw-p b7ced000 00:00 0 b7cee000-b7cf0000 r-xp 00000000 08:03 24789885 /lib/libdl-2.12.1.so b7cf0000-b7cf1000 r--p 00001000 08:03 24789885 /lib/libdl-2.12.1.so b7cf1000-b7cf2000 rw-p 00002000 08:03 24789885 /lib/libdl-2.12.1.so b7cf2000-b7e46000 r-xp 00000000 08:03 25576876 /lib/libc-2.12.1.so b7e46000-b7e48000 r--p 00154000 08:03 25576876 /lib/libc-2.12.1.so b7e48000-b7e49000 rw-p 00156000 08:03 25576876 /lib/libc-2.12.1.so b7e49000-b7e4c000 rw-p b7e49000 00:00 0 b7e4c000-b7e61000 r-xp 00000000 08:03 24789888 /lib/libpthread-2.12.1.so b7e61000-b7e62000 r--p 00014000 08:03 24789888 /lib/libpthread-2.12.1.so b7e62000-b7e63000 rw-p 00015000 08:03 24789888 /lib/libpthread-2.12.1.so b7e63000-b7e65000 rw-p b7e63000 00:00 0 b7e65000-b7f78000 r-xp 00000000 08:03 28672013 /usr/lib/libpython2.6.so.1.0 b7f78000-b7f79000 r--p 00112000 08:03 28672013 /usr/lib/libpython2.6.so.1.0 b7f79000-b7fa5000 rw-p 00113000 08:03 28672013 /usr/lib/libpython2.6.so.1.0 b7fa5000-b7fae000 rw-p b7fa5000 00:00 0 b7fb2000-b7fca000 r-xp 00000000 08:03 28574938 /usr/lib/gcc/i686-pc-linux-gnu/4.5.2/libgcc_s.so.1 b7fca000-b7fcb000 r--p 00017000 08:03 28574938 /usr/lib/gcc/i686-pc-linux-gnu/4.5.2/libgcc_s.so.1 b7fcb000-b7fcc000 rw-p 00018000 08:03 28574938 /usr/lib/gcc/i686-pc-linux-gnu/4.5.2/libgcc_s.so.1 b7fcc000-b7fcd000 rw-p b7fcc000 00:00 0 b7fcd000-b7fdb000 r-xp 00000000 08:03 23167022 /usr/lib/libtre.so.5.0.0 b7fdb000-b7fdc000 r--p 0000d000 08:03 23167022 /usr/lib/libtre.so.5.0.0 b7fdc000-b7fdd000 rw-p 0000e000 08:03 23167022 /usr/lib/libtre.so.5.0.0 b7fdd000-b7fdf000 r-xp 00000000 08:03 23691379 /usr/lib/python2.6/site-packages/tre.so b7fdf000-b7fe0000 r--p 00001000 08:03 23691379 /usr/lib/python2.6/site-packages/tre.so b7fe0000-b7fe1000 rw-p 00002000 08:03 23691379 /usr/lib/python2.6/site-packages/tre.so b7fe1000-b7ffd000 r-xp 00000000 08:03 25576875 /lib/ld-2.12.1.so b7ffd000-b7ffe000 rw-p b7ffd000 00:00 0 b7ffe000-b7fff000 r--p 0001c000 08:03 25576875 /lib/ld-2.12.1.so b7fff000-b8000000 rw-p 0001d000 08:03 25576875 /lib/ld-2.12.1.so bffe8000-c0000000 rw-p bffe7000 00:00 0 [stack] ffffe000-fffff000 r-xp 00000000 00:00 0 [vdso] Program received signal SIGABRT, Aborted. 0xffffe424 in ?? () (gdb) where #0 0xffffe424 in ?? () #1 0xb7d1de32 in abort () at abort.c:92 #2 0xb7d57b85 in __libc_message (do_abort=2, fmt=0xb7e28fa0 "*** glibc detected *** %s: %s: 0x%s ***\n") at ../sysdeps/unix/sysv/linux/libc_fatal.c:186 #3 0xb7d5da41 in malloc_printerr (action=, str=0x6
, ptr=0x80be298) at malloc.c:6283 #4 0xb7d5f2c0 in _int_free (av=, p=) at malloc.c:4795 #5 0xb7d623ad in __libc_free (mem=0x80be298) at malloc.c:3738 #6 0xb7d9629a in free_token (node=) at regcomp.c:3769 #7 0xb7d9636d in free_dfa_content (dfa=) at regcomp.c:593 #8 0xb7d964f5 in __regfree (preg=0xb7c70448) at regcomp.c:642 #9 0xb7fde4d3 in PyTrePattern_dealloc (self=0xb7c70440) at python/tre-python.c:409 #10 0xb7ec1287 in insertdict (mp=0xb7cb424c, key=0xb7c772e0, hash=690156838, value=0xb7f87340) at Objects/dictobject.c:459 #11 0xb7ec3b31 in PyDict_SetItem (op=0xb7cb424c, key=0xb7c772e0, value=0xb7f87340) at Objects/dictobject.c:701 #12 0xb7ec5521 in _PyModule_Clear (m=0xb7c8211c) at Objects/moduleobject.c:138 #13 0xb7f2ac44 in PyImport_Cleanup () at Python/import.c:441 #14 0xb7f332cb in Py_Finalize () at Python/pythonrun.c:444 #15 0xb7f3f254 in Py_Main (argc=2, argv=0xbfffe514) at Modules/main.c:609 #16 0x080487fe in main (argc=2, argv=0xbfffe514) at ./Modules/python.c:46 (gdb) bt full #0 0xffffe424 in ?? () No symbol table info available. #1 0xb7d1de32 in abort () at abort.c:92 act = {__sigaction_handler = {sa_handler = 0xb7fff4c4 <_rtld_local+1220>, sa_sigaction = 0xb7fff4c4 <_rtld_local+1220>}, sa_mask = {__val = {851968, 134514544, 134513788, 3221215844, 256, 3221215812, 134513436, 3221215656, 4, 3221215740, 3084617073, 19, 134514544, 3221215740, 3085205492, 16, 3221217200, 3221215860, 3084728356, 5, 3221215740, 4, 0, 3221215836, 3221215848, 2, 3085065449, 3085065445, 3085060993, 3085061019, 230, 3221215740}}, sa_flags = -1073751484, sa_restorer = 0xb7e27039} sigs = {__val = {32, 0 }} #2 0xb7d57b85 in __libc_message (do_abort=2, fmt=0xb7e28fa0 "*** glibc detected *** %s: %s: 0x%s ***\n") at ../sysdeps/unix/sysv/linux/libc_fatal.c:186 ap = fd = -1073751124 on_2 = list = nlist = cp = written = false #3 0xb7d5da41 in malloc_printerr (action=, str=0x6
, ptr=0x80be298) at malloc.c:6283 buf = "080be298" cp = #4 0xb7d5f2c0 in _int_free (av=, p=) at malloc.c:4795 size = 0 nextchunk = 0xe40 nextsize = 3084250342 prevsize = bck = fwd = errstr = 0x6
__func__ = "_int_free" #5 0xb7d623ad in __libc_free (mem=0x80be298) at malloc.c:3738 ar_ptr = 0xb7e493a0 p = 0x6 #6 0xb7d9629a in free_token (node=) at regcomp.c:3769 No locals. #7 0xb7d9636d in free_dfa_content (dfa=) at regcomp.c:593 i = 20 j = #8 0xb7d964f5 in __regfree (preg=0xb7c70448) at regcomp.c:642 dfa = 0x0 #9 0xb7fde4d3 in PyTrePattern_dealloc (self=0xb7c70440) at python/tre-python.c:409 No locals. #10 0xb7ec1287 in insertdict (mp=0xb7cb424c, key=0xb7c772e0, hash=690156838, value=0xb7f87340) at Objects/dictobject.c:459 ep = #11 0xb7ec3b31 in PyDict_SetItem (op=0xb7cb424c, key=0xb7c772e0, value=0xb7f87340) at Objects/dictobject.c:701 hash = n_used = 9 #12 0xb7ec5521 in _PyModule_Clear (m=0xb7c8211c) at Objects/moduleobject.c:138 s = pos = 7 key = 0xb7c772e0 value = 0xb7c70440 d = 0xb7cb424c #13 0xb7f2ac44 in PyImport_Cleanup () at Python/import.c:441 pos = ndone = 1 name = key = value = 0xb7c8211c dict = ---Type to continue, or q to quit--- interp = 0x804b008 modules = 0xb7c979bc #14 0xb7f332cb in Py_Finalize () at Python/pythonrun.c:444 interp = 0x804b008 #15 0xb7f3f254 in Py_Main (argc=2, argv=0xbfffe514) at Modules/main.c:609 c = sts = 0 command = 0x0 filename = 0xbfffe774 "tre-test.py" module = 0x0 fp = p = 0x0 unbuffered = 1 skipfirstline = 0 stdin_is_interactive = 1 help = 1 version = 1 saw_unbuffered_flag = 1 cf = {cf_flags = 0} target_script_name = 0x0 #16 0x080487fe in main (argc=2, argv=0xbfffe514) at ./Modules/python.c:46 process_name = 0x0 (gdb)