Re: [Python-Dev] head crashing

2007-05-02 Thread Kristján Valur Jónsson
> -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: Tuesday, May 01, 2007 20:46 > But then you would substantially change the memory access behavior of > the > program in a debug build, that is, more than it is already changed by > the > fact that you have cha

Re: [Python-Dev] head crashing (was: Fwd: [Python-checkins] buildbot warnings in x86 mvlgcc trunk)

2007-05-01 Thread Brett Cannon
On 5/1/07, Tim Peters <[EMAIL PROTECTED]> wrote: [Neal Norwitz] >> In rev 54982 (the first time this crash was seen), I see something >> which might create a problem. In python/trunk/Modules/posixmodule.c >> (near line 6300): >> >> + PyMem_FREE(mode); >>Py_END_ALLOW_THREADS Shoul

Re: [Python-Dev] head crashing (was: Fwd: [Python-checkins] buildbot warnings in x86 mvlgcc trunk)

2007-05-01 Thread Tim Peters
[Neal Norwitz] >> In rev 54982 (the first time this crash was seen), I see something >> which might create a problem. In python/trunk/Modules/posixmodule.c >> (near line 6300): >> >> + PyMem_FREE(mode); >>Py_END_ALLOW_THREADS Shouldn't do that. [Brett Cannon] > The PyMem_MALLOC cal

Re: [Python-Dev] head crashing

2007-05-01 Thread skip
Kristján> I'd suggest to keep the debug functions as a thin layer on top Kristján> of malloc to do basic testing. But then you would substantially change the memory access behavior of the program in a debug build, that is, more than it is already changed by the fact that you have change

Re: [Python-Dev] head crashing

2007-05-01 Thread Kristján Valur Jónsson
> but I got to a different conclusion. If it really goes through the > pymalloc pool (obmalloc), then it must hold the GIL while doing so. > obmalloc itself is not thread-safe, and relies on the GIL for > thread-safety. > > In release mode, PyMEM_FREE goes directly to free, which is thread- > safe.

Re: [Python-Dev] head crashing (was: Fwd: [Python-c heckins] buildbot warnings in x86 mvlgcc trunk)

2007-05-01 Thread Michael Hudson
Neal Norwitz gmail.com> writes: > > Can you call PyMem_FREE() without the GIL held? I couldn't find it > documented either way. Nope. See comments at the top of Python/pystate.c. Cheers, mwh ___ Python-Dev mailing list Python-Dev@python.org http:/

Re: [Python-Dev] head crashing

2007-05-01 Thread Martin v. Löwis
> I believe the GIL does not need to be held, but obviously Tim or someone > with more memory experience should step in to say definitively. > > If you look at Include/pymem.h, PyMem_FREE gets defined as PyObject_FREE > in a debug build. PyObject_Free is defined at _PyObject_DebugFree. > That fu

Re: [Python-Dev] head crashing (was: Fwd: [Python-checkins] buildbot warnings in x86 mvlgcc trunk)

2007-05-01 Thread Brett Cannon
On 5/1/07, Neal Norwitz <[EMAIL PROTECTED]> wrote: In rev 54982 (the first time this crash was seen), I see something which might create a problem. In python/trunk/Modules/posixmodule.c (near line 6300): + PyMem_FREE(mode); Py_END_ALLOW_THREADS The PyMem_MALLOC call that creat

Re: [Python-Dev] head crashing (was: Fwd: [Python-checkins] buildbot warnings in x86 mvlgcc trunk)

2007-05-01 Thread Neal Norwitz
In rev 54982 (the first time this crash was seen), I see something which might create a problem. In python/trunk/Modules/posixmodule.c (near line 6300): + PyMem_FREE(mode); Py_END_ALLOW_THREADS Can you call PyMem_FREE() without the GIL held? I couldn't find it documented either way