[snake-farm] Re: [Python-Dev] Snake farm

Marc Recht marc@informatik.uni-bremen.de
11 Nov 2002 15:32:08 +0100

Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

> But there are optimization flags set by default in the Makefile
> (at OPT=3D...).  Can you take out the -O3 from the OPT variable and
> start over?  As Tim Peters suggested, this may be an optimizer bug.
I removed them from the Makefile. (Of course :-))

> So it looks like PyOblect_Free() was called with 0x800 as an argument,
> which is a bogus pointer value.  Can you go up one stack level and see
> what the value of k in function_call() is?
713		if (ADDRESS_IN_RANGE(p, pool->arenaindex)) {
(gdb) up
#1  0x080dfef4 in function_call (func=3D0x826317c, arg=3D0x8256aac,
kw=3D0x8269bdc) at Objects/funcobject.c:481
481			PyMem_DEL(k);
(gdb) p k
$1 =3D (struct _object **) 0x800

> Well, --without-pymalloc means that this code is never executed.  It's
> disturbing that --with-pydebug doesn't reveal a problem though; that
> again points in the direction of the optimizer.
CC=3D'gcc' LDSHARED=3D'cc -shared ' OPT=3D'-DNDEBUG -g -Wall
-Wstrict-prototypes' ./python -E ./setup.py build;

Except "prefix" no option was given to configure.


"Premature optimization is the root of all evil." -- Donald E. Knuth

Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part

Version: GnuPG v1.2.1 (FreeBSD)