import gc class Foo(object): x = [] Foo().x gc.get_referents(Foo.__dict__)[0]['x'] = [] print(Foo().x)
Standard input is empty
Standard output is empty
*** Error in `python3': double free or corruption (fasttop): 0x000055d69f59b110 *** ======= Backtrace: ========= /lib/x86_64-linux-gnu/libc.so.6(+0x70bcb)[0x2b32d5977bcb] /lib/x86_64-linux-gnu/libc.so.6(+0x76f96)[0x2b32d597df96] /lib/x86_64-linux-gnu/libc.so.6(+0x7778e)[0x2b32d597e78e] python3(+0x2011f5)[0x55d69f02d1f5] python3(+0x6be7a)[0x55d69ee97e7a] python3(PyCFunction_Call+0xd1)[0x55d69efec761] python3(PyObject_Call+0x47)[0x55d69f035647] python3(+0x102ceb)[0x55d69ef2eceb] python3(_PyObject_CallMethodId+0xd6)[0x55d69f036e46] python3(+0x2539b4)[0x55d69f07f9b4] python3(PyRun_SimpleFileExFlags+0x1c8)[0x55d69f0825c8] python3(Py_Main+0x457)[0x55d69f0b04d7] python3(main+0xe1)[0x55d69ef40c01] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf1)[0x2b32d59272b1] python3(_start+0x2a)[0x55d69f04a1ba] ======= Memory map: ======== 2b32d4975000-2b32d4998000 r-xp 00000000 fd:00 3486923 /lib/x86_64-linux-gnu/ld-2.24.so 2b32d4998000-2b32d499b000 rw-p 00000000 00:00 0 2b32d499b000-2b32d49a2000 r--s 00000000 fd:00 3613759 /usr/lib/x86_64-linux-gnu/gconv/gconv-modules.cache 2b32d49a2000-2b32d49a3000 rw-p 00000000 00:00 0 2b32d49a4000-2b32d49a8000 rw-p 00000000 00:00 0 2b32d49a8000-2b32d4b43000 r--p 00000000 fd:00 3612923 /usr/lib/locale/locale-archive 2b32d4b43000-2b32d4b83000 rw-p 00000000 00:00 0 2b32d4b98000-2b32d4b99000 r--p 00023000 fd:00 3486923 /lib/x86_64-linux-gnu/ld-2.24.so 2b32d4b99000-2b32d4b9a000 rw-p 00024000 fd:00 3486923 /lib/x86_64-linux-gnu/ld-2.24.so 2b32d4b9a000-2b32d4b9b000 rw-p 00000000 00:00 0 2b32d4b9b000-2b32d4bb3000 r-xp 00000000 fd:00 3486909 /lib/x86_64-linux-gnu/libpthread-2.24.so 2b32d4bb3000-2b32d4db2000 ---p 00018000 fd:00 3486909 /lib/x86_64-linux-gnu/libpthread-2.24.so 2b32d4db2000-2b32d4db3000 r--p 00017000 fd:00 3486909 /lib/x86_64-linux-gnu/libpthread-2.24.so 2b32d4db3000-2b32d4db4000 rw-p 00018000 fd:00 3486909 /lib/x86_64-linux-gnu/libpthread-2.24.so 2b32d4db4000-2b32d4db8000 rw-p 00000000 00:00 0 2b32d4db8000-2b32d4dba000 r-xp 00000000 fd:00 3486901 /lib/x86_64-linux-gnu/libdl-2.24.so 2b32d4dba000-2b32d4fba000 ---p 00002000 fd:00 3486901 /lib/x86_64-linux-gnu/libdl-2.24.so 2b32d4fba000-2b32d4fbb000 r--p 00002000 fd:00 3486901 /lib/x86_64-linux-gnu/libdl-2.24.so 2b32d4fbb000-2b32d4fbc000 rw-p 00003000 fd:00 3486901 /lib/x86_64-linux-gnu/libdl-2.24.so 2b32d4fbc000-2b32d4fbe000 r-xp 00000000 fd:00 3486908 /lib/x86_64-linux-gnu/libutil-2.24.so 2b32d4fbe000-2b32d51bd000 ---p 00002000 fd:00 3486908 /lib/x86_64-linux-gnu/libutil-2.24.so 2b32d51bd000-2b32d51be000 r--p 00001000 fd:00 3486908 /lib/x86_64-linux-gnu/libutil-2.24.so 2b32d51be000-2b32d51bf000 rw-p 00002000 fd:00 3486908 /lib/x86_64-linux-gnu/libutil-2.24.so 2b32d51bf000-2b32d51e6000 r-xp 00000000 fd:00 3486886 /lib/x86_64-linux-gnu/libexpat.so.1.6.2 2b32d51e6000-2b32d53e6000 ---p 00027000 fd:00 3486886 /lib/x86_64-linux-gnu/libexpat.so.1.6.2 2b32d53e6000-2b32d53e8000 r--p 00027000 fd:00 3486886 /lib/x86_64-linux-gnu/libexpat.so.1.6.2 2b32d53e8000-2b32d53e9000 rw-p 00029000 fd:00 3486886 /lib/x86_64-linux-gnu/libexpat.so.1.6.2 2b32d53e9000-2b32d5402000 r-xp 00000000 fd:00 3486897 /lib/x86_64-linux-gnu/libz.so.1.2.8 2b32d5402000-2b32d5601000 ---p 00019000 fd:00 3486897 /lib/x86_64-linux-gnu/libz.so.1.2.8 2b32d5601000-2b32d5602000 r--p 00018000 fd:00 3486897 /lib/x86_64-linux-gnu/libz.so.1.2.8 2b32d5602000-2b32d5603000 rw-p 00019000 fd:00 3486897 /lib/x86_64-linux-gnu/libz.so.1.2.8 2b32d5603000-2b32d5706000 r-xp 00000000 fd:00 3486952 /lib/x86_64-linux-gnu/libm-2.24.so 2b32d5706000-2b32d5905000 ---p 00103000 fd:00 3486952 /lib/x86_64-linux-gnu/libm-2.24.so 2b32d5905000-2b32d5906000 r--p 00102000 fd:00 3486952 /lib/x86_64-linux-gnu/libm-2.24.so 2b32d5906000-2b32d5907000 rw-p 00103000 fd:00 3486952 /lib/x86_64-linux-gnu/libm-2.24.so 2b32d5907000-2b32d5a9c000 r-xp 00000000 fd:00 3487050 /lib/x86_64-linux-gnu/libc-2.24.so 2b32d5a9c000-2b32d5c9b000 ---p 00195000 fd:00 3487050 /lib/x86_64-linux-gnu/libc-2.24.so 2b32d5c9b000-2b32d5c9f000 r--p 00194000 fd:00 3487050 /lib/x86_64-linux-gnu/libc-2.24.so 2b32d5c9f000-2b32d5ca1000 rw-p 00198000 fd:00 3487050 /lib/x86_64-linux-gnu/libc-2.24.so 2b32d5ca1000-2b32d5e96000 rw-p 00000000 00:00 0 2b32d5e96000-2b32d5eac000 r-xp 00000000 fd:00 3486888 /lib/x86_64-linux-gnu/libgcc_s.so.1 2b32d5eac000-2b32d60ab000 ---p 00016000 fd:00 3486888 /lib/x86_64-linux-gnu/libgcc_s.so.1 2b32d60ab000-2b32d60ac000 r--p 00015000 fd:00 3486888 /lib/x86_64-linux-gnu/libgcc_s.so.1 2b32d60ac000-2b32d60ad000 rw-p 00016000 fd:00 3486888 /lib/x86_64-linux-gnu/libgcc_s.so.1 2b32d8000000-2b32d8021000 rw-p 00000000 00:00 0 2b32d8021000-2b32dc000000 ---p 00000000 00:00 0 55d69ee2c000-55d69f21b000 r-xp 00000000 fd:00 4129372 /usr/bin/python3.5 55d69f41a000-55d69f41c000 r--p 003ee000 fd:00 4129372 /usr/bin/python3.5 55d69f41c000-55d69f4b3000 rw-p 003f0000 fd:00 4129372 /usr/bin/python3.5 55d69f4b3000-55d69f4e4000 rw-p 00000000 00:00 0 55d69f55e000-55d69f689000 rw-p 00000000 00:00 0 [heap] 7ffd71f06000-7ffd71f27000 rw-p 00000000 00:00 0 [stack] 7ffd71fbd000-7ffd71fbf000 r-xp 00000000 00:00 0 [vdso] 7ffd71fbf000-7ffd71fc1000 r--p 00000000 00:00 0 [vvar] ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 [vsyscall]