Re: [Python-Dev] tp_dealloc

2010-06-02 Thread Nick Coghlan

On 01/06/10 22:21, [email protected] wrote:

This said, there may be a bug somewhere, but what do you want us to look
at?
Do you have a case that we could reproduce and investigate?

--
Amaury Forgeot d'Arc


Thank you, I'm not a C-Developer,
but still I have one more detail:

I call py_decRef( pyObj) of dll (version 3.1.1),
( which calls tp_dealloc, which calls my freeMem() method))
No problem is reported here.


As Amaury has pointed out, there are a number of ways this could be bug 
in your extension module, or some other CPython extension you are using 
(most obviously, a Py_DECREF without a corresponding Py_INCREF, but 
there are probably other more exotic ways to manage it).


If you corrupt the reference count for a module global variable with an 
extra Py_DECREF call, then you may get an access violation at 
interpreter shutdown (i.e. in response to a Py_Finalize call) as the 
destruction of the module attempts to decrement the reference count of 
an object that was incorrectly deleted while it was still referenced.


Since the symptoms you have described so far *exactly* match the 
expected symptoms of a reference counting bug which may not have 
anything whatsoever to do with the interpreter core or the standard 
library, you're going to need a much better defined test case (written 
in C or Python) to convince us that our code is the problem.


Regards,
Nick.

--
Nick Coghlan   |   [email protected]   |   Brisbane, Australia
---
___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


[Python-Dev] Windows registry path not ignored with Py_IgnoreEnvironmentFlag set

2010-06-02 Thread Farshid Lashkari
Hello,

I noticed that if Py_IgnoreEnvironmentFlag is enabled, the Windows registry
is still used to initialize sys.path during startup. Is this an oversight or
intentional?

I assumed one of the intentions of this flag is to prevent embedded Python
interpreters from being affected by other Python installations. Ignoring the
Window registry as well as environment variables seems to make sense in this
situation.

If this is an oversight, would it be too late to have this fixed in Python
2.7?

Cheers,
Farshid
___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com