[Python-Dev] pdb segfaults in 2.5 trunk? (original) (raw)
Neal Norwitz nnorwitz at gmail.com
Tue Apr 11 10:22:06 CEST 2006
- Previous message: [Python-Dev] pdb segfaults in 2.5 trunk?
- Next message: [Python-Dev] pdb segfaults in 2.5 trunk?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 4/10/06, Neal Norwitz <nnorwitz at gmail.com> wrote:
On 4/10/06, Phillip J. Eby <pje at telecommunity.com> wrote: > > It appears the problem is an object/mem mismatch: both PyOSReadline in > pgenmain.c, and PyOSStdioReadline use PyObjectMALLOC, but bltinmodule.c > is freeing the pointer with PyMemFREE.
This (Readline using PyObject) was due to my recent change to fix Guido's problem last night. I didn't realize anything seeped out. All calls to PyOSStdioReadline would need to be updated. I can do that tonight. Hmm, that means this will be an API change. I wonder if I should revert my fix and just deal with a second alloc and copy of the data to fix Guido's original problem.
I partially reverted my fix from last night. It appears to work for both Guido's original problem and Phillip's subsequent problem. YMMV. It would be great if someone could review all the PyMem_* and PyObject_* allocs and frees to ensure consistency.
I wonder if the code would be clearer if the encoding was changed back to using PyObject_*. Then there would only be a few clear cases for using PyMem_* in Parser/.
n
- Previous message: [Python-Dev] pdb segfaults in 2.5 trunk?
- Next message: [Python-Dev] pdb segfaults in 2.5 trunk?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]