Sridhar Ratnakumar <sridh...@activestate.com> added the comment: I am using "cc: HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]" .. with the following options.
cc +DD64 -Ae -D_REENTRANT +Z -c -g -DNDEBUG -O -I. -IInclude -I./Include -DPy_BUILD_CORE -o Modules/gcmodule.o Modules/gcmodule.c So that is +O2 level. ---- Interestingly the following patch fixes the bug, and shows that this is a optimization bug in HPUX compiler: diff -r 549fd95a5eb9 Modules/gcmodule.c --- a/Modules/gcmodule.c Mon May 10 23:51:33 2010 +0200 +++ b/Modules/gcmodule.c Tue May 11 11:02:52 2010 -0700 @@ -984,7 +984,8 @@ /* Find the oldest generation (highest numbered) where the count * exceeds the threshold. Objects in the that generation and * generations younger than it will be collected. */ - for (i = NUM_GENERATIONS-1; i >= 0; i--) { + i = NUM_GENERATIONS-1; + while (i>=0){ if (generations[i].count > generations[i].threshold) { /* Avoid quadratic performance degradation in number of tracked objects. See comments at the beginning @@ -996,6 +997,7 @@ n = collect(i); break; } + i--; } return n; } ---- I will try to use a different optimization level now. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue8683> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com