Thank you for your review, Pedro! On 06/23/2016 06:14 PM, Pedro Alves wrote: > So the problem is that the next time gdbpy_breakpoint_created > is called, for some other breakpoint, we'll dereference the dangling > pointer then, correct? Exactly. This happens when a second breakpoint is created but not using the Python API, otherwise bppy_pending_object is set to a new Python wrapper before it is reused. > "start" doesn't work with "target remote" testing. Try: > > $ make check \ > RUNTESTFLAGS="--target_board=native-gdbserver" \ > TESTS="gdb.python/py-breakpoint2.exp" > > Can we instead run to main first, and then source the python > script? Ah, I did not know that, thanks. > Wouldn't it better to create a breakpoint after the one > that failed, explicitly? Either in python, or perhaps > simpler, a regular command line breakpoint directly in > the .exp file. Good idea! I’ve reworked the testcase as you said. The bug does not manifest with a crash anymore, though: it’s just that a Python method is called whereas it should not. But it may be a more reliable testcase. -- Pierre-Marie de Rodat