test_format breaks when run in farm on hp/ux

Quest <[email protected]> Sun, 25 May 2003 23:20:22 +0200
Newsgroups gmane.comp.python.snake-farm.user
Organization Pantheon
Message-ID <[email protected]>
In xenofarm, test_format seems to SEGV python interpreter.

  test_fileinput
  test_fnmatch
  test_fork1
  test_format
  *** Termination signal 139 (ignored)
  ./python -E -tt ./Lib/test/regrtest.py -x test_pwd test_nis -x  test_tempfile -x test_sunaudiodev test_grammar

Some manual pasting of test_format.py results thus (have_unicode == 1):

  >>> testboth("%f", (1.0,), "1.000000")
  '%f' % (1.0,) =? '1.000000' ... yes
  zsh: segmentation fault  ./python

Or, in condensed form :)

  [ 23:16 ] - ./python
  Python 2.3b1+ (#1, May 25 2003, 21:42:25) 
  [GCC 3.2] on hp-ux11
  Type "help", "copyright", "credits" or "license" for more information.
  >>> formatstr = unicode("%f")
  >>> args = (1.0,)
  >>> result = formatstr % args
  zsh: segmentation fault  ./python

Unfortunately, -g is ignored by gcc on HP/UX, so I can't get a good
debug on this one:

  (gdb) set args ../python/dist/src/Lib/test/regrtest.py test_format
  (gdb) run
  Starting program: /mp/slaskdisk/tmp/quest/build_python_taylor/python ../python/dist/src/Lib/test/regrtest.py test_format

  (no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...
  (no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...test_format

  Program received signal SIGSEGV, Segmentation fault.
  0x77f870b8 in __fwrite_unlocked () from /usr/lib/libc.2
  (gdb) bt
  #0  0x77f870b8 in __fwrite_unlocked () from /usr/lib/libc.2
  #1  0x77f873e8 in _doprnt () from /usr/lib/libc.2
  #2  0x30303030 in ?? ()
  Error accessing memory address 0x3030301c: Bad address.

Compiling the code using /opt/ansic/bin/cc passes the test. I say this
smells like gcc is a few horses short of a cavalry.
--
Anders "Quest" Qvist
http://www.lysator.liu.se/~sfarmer