A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2004-August/047884.html below:

[Python-Dev] test_tempfile failure on Mac OSX

[Python-Dev] test_tempfile failure on Mac OSXSkip Montanaro skip at pobox.com
Mon Aug 16 17:51:06 CEST 2004
I think I might have reported this previously (long time ago), but I don't
recall if it was ever resolved.  (Apparently not, since I'm still seeing
it.)

I'm seeing a test failure in test_tempfile on Mac OSX (I'm running
10.2.8/Jaguar) with a unix (not framework) build.  I've whittled the tests
down to sundry, tcl and tempfile.  Here's the full run:

    % ./python.exe Lib/test/regrtest.py -f testrun 
    test_sundry
    test_tcl
    test_tempfile
    *** malloc[17153]: error for object 0x2d70808: Pointer being reallocated was not allocated
    [5999 refs]
    test test_tempfile failed -- Traceback (most recent call last):
      File "/Users/skip/tmp/python/dist/src/Lib/test/test_tempfile.py", line 155, in test_wanted_dirs
        os.environ[envname] = os.path.abspath(envname)
      File "/Users/skip/tmp/python/dist/src/Lib/os.py", line 447, in __setitem__
        putenv(key, item)
    OSError: (0, 'Error')

    2 tests OK.
    1 test failed:
        test_tempfile
    [39478 refs]

This is a debug build linked with /usr/lib/libMallocDebug.a.  Running under
gdb's control with a breakpoint in malloc_printf yields this traceback info:

    (gdb) bt 10
    #0  0x90070ddc in malloc_printf ()
    #1  0x9000de5c in szone_realloc ()
    #2  0x9000dd70 in malloc_zone_realloc ()
    #3  0x9000dce8 in realloc ()
    #4  0x90010c24 in setenv ()
    #5  0x90010a74 in putenv ()
    #6  0x00131018 in posix_putenv (self=0x0, args=0x12ac678) at Modules/posixmodule.c:5695
    #7  0x000db4fc in PyCFunction_Call (func=0x3e25f8, arg=0x12ac678, kw=0x0) at Objects/methodobject.c:73
    #8  0x000ce2f4 in call_function (pp_stack=0xbfff94f0, oparg=2) at Python/ceval.c:3566
    #9  0x000c8624 in PyEval_EvalFrame (f=0xa05108) at Python/ceval.c:2170
    ...

In frame 6, putenv() is being called:

    (gdb) fr 6
    #6  0x00131018 in posix_putenv (self=0x0, args=0x12ac678) at Modules/posixmodule.c:5695
    5695            if (putenv(new)) {
    (gdb) p new
    $1 = 0x109a5e4 "TMPDIR=/Users/skip/tmp/python/dist/src/TMPDIR"

This looks reasonable to me, so it doesn't look like the problem is within
Python.  Should I just skip the tempfile test on Mac OSX?  Can someone check
this out on 10.3/Panther?

Skip
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4