[Python-Dev] segmentation fault with python2.3a0 from cvs

Zack Weinberg zack@codesourcery.com
Mon, 7 Oct 2002 10:38:34 -0700


On Mon, Oct 07, 2002 at 07:02:10PM +0200, Gerson Kurz wrote:
> Hi folks,
> 
> yesterday I posted a problem with importing a very large sourcefile in
> python 2.2.1 to clp. For the original report, see
> <news:3da070ec.18868296@news.t-online.de>. Andrew MacIntyre suggested that
> 2.3 would handle this situation much better, so I got the current version
> from CVS, built it with cygwin and tested it. Now, instead of just a
> MemoryError, I get this:

For what it's worth, this may be system-specific.  I was able to
import your test case under both 2.2.1 and 2.3a0 with no problem, on
linux.  The 2.3 compiler is a lot faster, which is nice.

However, running python 2.3 under valgrind produces floods of 'invalid
read' and 'conditional depends on uninitialized value' errors before
we ever get to the prompt, so this may well be a system-independent
bug that only happens to expose itself on cygwin.

zw

Python 2.2.1 (#2, Sep 13 2002, 23:25:07) 
[GCC 2.95.4 20011002 (Debian prerelease)] on linux2

# from .py
>>> profile.run('import test')
         3 function calls in 49.840 CPU seconds

   Ordered by: standard name

   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
        1   48.980   48.980   49.830   49.830 <string>:1(?)
        1    0.010    0.010   49.840   49.840 profile:0(import test)
        0    0.000             0.000          profile:0(profiler)
        1    0.850    0.850    0.850    0.850 test.py:2(?)

# from .pyc
>>> profile.run('import test') 
         3 function calls in 1.140 CPU seconds

   Ordered by: standard name

   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
        1    0.420    0.420    1.130    1.130 <string>:1(?)
        1    0.010    0.010    1.140    1.140 profile:0(import test)
        0    0.000             0.000          profile:0(profiler)
        1    0.710    0.710    0.710    0.710 test.py:2(?)

Python 2.3a0 (#30, Oct  7 2002, 10:25:24) 
[GCC 2.95.4 20011002 (Debian prerelease)] on linux2

# from .py
>>> profile.run('import test')
         3 function calls in 19.030 CPU seconds

   Ordered by: standard name

   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
        1   18.370   18.370   19.000   19.000 <string>:1(?)
        1    0.030    0.030   19.030   19.030 profile:0(import test)
        0    0.000             0.000          profile:0(profiler)
        1    0.630    0.630    0.630    0.630 test.py:2(?)

# from .pyc
>>> profile.run('import test')
         3 function calls in 0.920 CPU seconds

   Ordered by: standard name

   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
        1    0.420    0.420    0.910    0.910 <string>:1(?)
        1    0.010    0.010    0.920    0.920 profile:0(import test)
        0    0.000             0.000          profile:0(profiler)
        1    0.490    0.490    0.490    0.490 test.py:2(?)