[issue6836] Mismatching use of memory APIs

2009-09-28 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: visual Studio didn't detect the missing 'const' for the void pointer. Fixed now in revision 75016 and revision 75107 -- status: open -> closed ___ Python tracker

[issue6836] Mismatching use of memory APIs

2009-09-28 Thread R. David Murray
R. David Murray added the comment: Krisjan, after your commit I'm getting the following when trying to make python on both trunk and py3k: Objects/obmalloc.c:1372: error: conflicting types for '_PyObject_DebugCheckAddress' -- nosy: +r.david.murray status: closed -> open __

[issue6836] Mismatching use of memory APIs

2009-09-28 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: merged to py3k in 75105 -- resolution: -> accepted status: open -> closed ___ Python tracker ___ __

[issue6836] Mismatching use of memory APIs

2009-09-28 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: Committed changed debug memory API in revision 75104 -- ___ Python tracker ___ ___ Python-bu

[issue6836] Mismatching use of memory APIs

2009-09-28 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: Committed the fix to parsetok.c in revision 75103 -- ___ Python tracker ___ ___ Python-bugs-

[issue6836] Mismatching use of memory APIs

2009-09-08 Thread Tim Peters
Tim Peters added the comment: Right, I /was/ hallucinating about serialno -- good catch. Mysterious little integers still suck, though ;-) If you're going to store it in a byte, then you can #define semi-meaningful letter codes instead; e.g., #define _PYMALLOC_OBJECT_ID 'o' #define _PYMALLOC_

[issue6836] Mismatching use of memory APIs

2009-09-06 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: Good point, Tim. I'll rework it so that one of the border bytes is used, since it needs to be a "known" value anyway. That should make things less messy. Although resoning about the breakpoint is probably incorrect since you would put the breakpoint

[issue6836] Mismatching use of memory APIs

2009-09-06 Thread Tim Peters
Tim Peters added the comment: Yup, it's a good idea. In fact, storing info in the debug malloc blocks to identify the API family used was part of "the plan", but got dropped when time ran out. serialno should not be abused for this purpose, though. On a 32-bit box, a 24-bit real serialno is t

[issue6836] Mismatching use of memory APIs

2009-09-04 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: using the debugmalloc patch provided, I found only this one case when running the testsuite. Patch is provided. It is the simple solution of duplicating the string in this case. A more cumbersome solution would be to allocate the "encoding" using Py

[issue6836] Mismatching use of memory APIs

2009-09-04 Thread Nick Coghlan
Nick Coghlan added the comment: Poking the timbot - this seems like a good idea to me (and it also means C extension developers would be able to use a debug build of Python to look for errors in their own use of these APIs). -- nosy: +tim_one ___ Pyt

[issue6836] Mismatching use of memory APIs

2009-09-04 Thread Kristján Valur Jónsson
New submission from Kristján Valur Jónsson : There are instances in python where memory allocated using one api (PyMem_*) is freed using the other (PyObject_*). The provided patch (suggested for submission once we fix all instances) illustrates this. It is sufficient to fire up python_d and "im