Le dim. 5 avr. 2020 à 23:07, Skip Montanaro a écrit :
> I'm trying it the simplest way I can think of. Registers are exactly
> like local variables, so SETLOCAL Py_XDECREFs whatever is already
> there before overwriting it with a new value. At the end of
> _PyEval_EvalFrameDefault if the code
For posterity, just recording best guesses for the other mysteries left hanging:
- PYTHONTRACEMALLOC didn't work for you because Victor's traceback
showed that Py_FinalizeEx was executing _PyImport_Fini,, one statement
_after_ it disabled tracemalloc via _PyTraceMalloc_Fini.
- The address passed
> It seems like your Python changes use Py_False "somewhere" without
> Py_INCREF(Py_False).
> Maybe it's COMPARE_OP_REG() which calls SETLOCAL(dst, False).
Yes, this was the problem. Thanks for the fix. Too much blind
adherence on my part to the existing COMPARE_OP logic. I've even
written
Le dim. 5 avr. 2020 à 04:02, Skip Montanaro a écrit :
> The command is
>
> % PYTHONTRACEMALLOC=5 ./python ./Tools/scripts/run_tests.py -R
> 5:50:reflog.txt test_rattlesnake
> (...)
> FWIW, the register branch of my CPython fork:
>
> https://github.com/smontanaro/cpython/tree/register
gdb
[Skip Montanaro ]
> ...
> I thought setting PYTHONTRACEMALLOC should provoke some useful output,
> but I was confused into thinking I was (am?) still missed something
> because it continued to produce this message:
>
> Enable tracemalloc to get the memory block allocation traceback
Ah, I
Victor> I wrote the feature (both tracemalloc and query tracemalloc when a
Victor> buffer overflow is detected), so I should be able to help you ;-)
Yes, I thought you might. :-)
I've attached the output of a more complete run. The command is
% PYTHONTRACEMALLOC=5 ./python
[Skip Montanaro ]
> I've got a memory issue in my modified Python interpreter I'm trying
> to debug. Output at the end of the problematic unit test looks like this:
To my eyes, you left out the most important part ;-) A traceback
showing who made the fatal free() call to begin with.
In debug
Hi Skip,
I wrote the feature (both tracemalloc and query tracemalloc when a
buffer overflow is detected), so I should be able to help you ;-)
Le dim. 5 avr. 2020 à 00:27, Skip Montanaro a écrit :
> Looking at the tracemalloc module docs and trying various command line args
> (-X