Building Python 2.2 - curses module test failure

Michael Hudson mwh at python.net
Wed Jan 30 09:52:52 EST 2002


Nick Chalk <nick at leviathan.uklinux.net> writes:

> > Segmentation fault (core dumped)
> 
> > Holy crap!
> > Definitely seem to be freeing things we shouldn't.
> > I'm guessing noone's run test_curses in a while.
> > Are you using 2.2, or stuff from CVS?
> 
> I'm using the basic 2.2 tarball from
> ftp.python.org.

OK.

> I ran gdb on python, whilst it ran the minimal
> curses script. Confusingly, the pointer malloc
> complains about seems to be correct - it's
> returned by PyCursesWindow_New(), and then passed
> to PyCursesWindow_Dealloc(). There doesn't appear
> to be any corruption of the structure it points
> to, either. You may want to take this with a pinch
> of salt, though, as I'm a novice at both Python
> and gdb. :-)

Hmm.  I think there may be memory scribbling going on somewhere.  In
the fun way of these things, it may have nothing to do with curses.

It doesn't crash if I run test_curses manually, for example.  It
doesn't *work*:

$ ../../build/python test_curses.py
Traceback (most recent call last):
  File "test_curses.py", line 204, in ?
    curses.wrapper(main)
  File "/home/crew/mwh/src/python/dist/src/Lib/curses/wrapper.py", line 44, in wrapper
    res = apply(func, (stdscr,) + rest)
  File "test_curses.py", line 198, in main
    module_funcs(stdscr)
  File "test_curses.py", line 143, in module_funcs
    curses.curs_set(1)
_curses.error: curs_set() returned ERR

But it doesn't segfault either.

> Thanks for the reply, and the confirmation that I'm not doing
> something silly.

No, this doesn't seem to be your fault...

I wonder if I can prod someone with Purify into running
test_curses.py...

Cheers,
M.

-- 

  The bottom tier is what a certain class of wanker would call
  "business objects" ...                      -- Greg Ward, 9 Dec 1999



More information about the Python-list mailing list