This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author fim
Recipients fim
Date 2018-11-04.17:27:16
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1541352436.86.0.788709270274.issue35160@psf.upfronthosting.co.za>
In-reply-to
Content
Actually, I'm not so sure it's related to memory management after all judging by this (but I don't really know how the compilation part is supposed to work :)):


(gdb) watch *0x7ffff7ec0680
Hardware watchpoint 1: *0x7ffff7ec0680
(gdb) b Custom_dealloc
Breakpoint 2 at 0x7fffef9c4c50: file custom.c, line 16.
(gdb) run
[...]
Hardware watchpoint 1: *0x7ffff7ec0680

Old value = 0
New value = 1
dfs (c=c@entry=0x7fffffffd440, b=b@entry=0x7ffff7ec0660, a=a@entry=0x7fffffffd3b0, end=2) at Python/compile.c:4974
4974	        a->a_postorder[--j] = b;
(gdb) bt
#0  dfs (c=c@entry=0x7fffffffd440, b=b@entry=0x7ffff7ec0660, a=a@entry=0x7fffffffd3b0, end=2) at Python/compile.c:4974
#1  0x00000000004e9e86 in assemble (c=c@entry=0x7fffffffd440, addNone=<optimized out>) at Python/compile.c:5530
#2  0x00000000004f45c6 in compiler_mod (mod=0x9a86a8, c=0x7fffffffd440) at Python/compile.c:1641
#3  PyAST_CompileObject (mod=mod@entry=0x9a86a8, filename=filename@entry=0x7ffff7e510d8, flags=flags@entry=0x7fffffffd5e0, optimize=optimize@entry=-1, arena=arena@entry=0x7ffff7fb81e0)
    at Python/compile.c:345
#4  0x0000000000520025 in run_mod (arena=0x7ffff7fb81e0, flags=0x7fffffffd5e0, locals=0x7ffff7f38d80, globals=0x7ffff7f38d80, filename=0x7ffff7e510d8, mod=0x9a86a8)
    at Python/pythonrun.c:1028
#5  PyRun_InteractiveOneObjectEx (fp=fp@entry=0x7ffff749b8a0 <_IO_2_1_stdin_>, filename=filename@entry=0x7ffff7e510d8, flags=flags@entry=0x7fffffffd5e0) at Python/pythonrun.c:256
#6  0x0000000000520326 in PyRun_InteractiveLoopFlags (fp=fp@entry=0x7ffff749b8a0 <_IO_2_1_stdin_>, filename_str=filename_str@entry=0x5f1345 "<stdin>", flags=flags@entry=0x7fffffffd5e0)
    at Python/pythonrun.c:120
#7  0x000000000052049c in PyRun_AnyFileExFlags (fp=0x7ffff749b8a0 <_IO_2_1_stdin_>, filename=0x5f1345 "<stdin>", closeit=0, flags=0x7fffffffd5e0) at Python/pythonrun.c:78
#8  0x000000000042e0be in pymain_run_stdin (pymain=0x7fffffffd6f0, pymain=0x7fffffffd6f0, cf=0x7fffffffd5e0, config=0x922ea8) at Modules/main.c:1185
#9  pymain_run_python (interp=0x922e20, pymain=0x7fffffffd6f0) at Modules/main.c:1613
#10 pymain_main (pymain=0x7fffffffd6f0) at Modules/main.c:1758
#11 0x000000000042e309 in _Py_UnixMain (argc=<optimized out>, argv=<optimized out>) at Modules/main.c:1795
#12 0x00007ffff711b4db in __libc_start_main () from /lib64/libc.so.6
#13 0x000000000042ae6a in _start ()
(gdb) frame
#0  dfs (c=c@entry=0x7fffffffd440, b=b@entry=0x7ffff7ec0660, a=a@entry=0x7fffffffd3b0, end=2) at Python/compile.c:4974
4974	        a->a_postorder[--j] = b;
(gdb) c
Continuing.
weird pointer has value of: 0x1
>>> 

Breakpoint 2, Custom_dealloc (self=0x7ffff7ec0660) at custom.c:16
16	{
(gdb) print(self->test_field)
$1 = (PyObject *) 0x1
(gdb) print(&self->test_field)
$2 = (PyObject **) 0x7ffff7ec0680
History
Date User Action Args
2018-11-04 17:27:16fimsetrecipients: + fim
2018-11-04 17:27:16fimsetmessageid: <1541352436.86.0.788709270274.issue35160@psf.upfronthosting.co.za>
2018-11-04 17:27:16fimlinkissue35160 messages
2018-11-04 17:27:16fimcreate