Boost logo

Boost :

From: Ralf W. Grosse-Kunstleve (rwgk_at_[hidden])
Date: 2005-02-02 03:43:08


I am working with the very latest boost CVS.
Most Boost.Python tests fail with a segmentation fault with
these compilers:

  gcc version 3.3 20030304 (Apple Computer, Inc. build 1493)
  gcc version 3.3 20030304 (Apple Computer, Inc. build 1671)
  gcc version 3.2.2 20030222 (Red Hat Linux 3.2.2-5)
  gcc version 3.2.3 20030502 (Red Hat Linux 3.2.3-20)
  gcc version 3.4.3 # compiled from sources, running under RH WS 3
  gcc version 3.4.3 # compiled from sources, running under RH 8.0

In contrast, these gcc's do *not* have any problems:

  gcc version 2.96 20000731 (Red Hat Linux 7.3 2.96-113)
  gcc version 3.2 20020903 (Red Hat Linux 8.0 3.2-7)

valgrind reports no errors for gcc version 3.2 under RH 8.0, but
complains about the gcc 3.4.3 compiled code on the same machine (see
below).

The problem appears to be independent of the Python version (problem
observed with 2.2, 2.3, 2.4) and the optimizer (problem observed with
-O3 and -O0).

The Boost CVS from 2005-Jan-26 11:43 PDT didn't have this problem.

I attach the valgrind output for one of the Boost.Python tests.
Does this ring any bells?

# gcc version 3.2.3 20030502 (Red Hat Linux 3.2.3-20)
% valgrind --tool=memcheck /usr/bin/python
$BOOST_DIST/libs/python/test/object.py

running...
==19174== Memcheck, a memory error detector for x86-linux.
==19174== Copyright (C) 2002-2004, and GNU GPL'd, by Julian Seward et al.
==19174== Using valgrind-2.2.0, a program supervision framework for x86-linux.
==19174== Copyright (C) 2000-2004, and GNU GPL'd, by Julian Seward et al.
==19174== For more details, rerun with: -v
==19174==
disInstr: unhandled instruction bytes: 0xCD 0x5 0x90 0x55
          at 0x1BE8A57D: _object*
boost::python::api::object_base_initializer<boost::python::handle<_typeobject>
>(boost::python::handle<_typeobject> const&) (object_core.hpp:285)
==19174==
==19174== Process terminating with default action of signal 4 (SIGILL)
==19174== Illegal operand at address 0xB0021520
==19174== at 0x1BE8A57D: _object*
boost::python::api::object_base_initializer<boost::python::handle<_typeobject>
>(boost::python::handle<_typeobject> const&) (object_core.hpp:285)
==19174== by 0x1BE89B32:
boost::python::api::object::object<boost::python::handle<_typeobject>
>(boost::python::handle<_typeobject> const&) (object_core.hpp:310)
==19174== by 0x1BE8D921: boost::python::objects::(anonymous
namespace)::new_class(char const*, unsigned, boost::python::type_info const*,
char const*) (class.cpp:501)
==19174== by 0x1BE8BFCD: boost::python::objects::class_base::class_base(char
const*, unsigned, boost::python::type_info const*, char const*) (class.cpp:514)
==19174==
==19174== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 47 from 1)
==19174== malloc/free: in use at exit: 714158 bytes in 8967 blocks.
==19174== malloc/free: 34052 allocs, 25085 frees, 6930352 bytes allocated.
==19174== For a detailed leak analysis, rerun with: --leak-check=yes
==19174== For counts of detected errors, rerun with: -v
Illegal instruction

                
__________________________________
Do you Yahoo!?
Yahoo! Mail - Easier than ever with enhanced search. Learn more.
http://info.mail.yahoo.com/mail_250


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk