Boost logo

Boost Testing :

From: Robert Ramey (ramey_at_[hidden])
Date: 2005-07-07 10:32:15


Thanks for looking into this. I've been bogged down on other stuff but I am
very interested. I will look at the information below in detail. For now I
can tell you that I had a lot of problems with compilers optimizing away
code that is not referenced by name. This usually is associated with
serialization of derived pointers. In i/oserializaer pointer_i/oserializer
you'll notice a number of hacks to try to inhibit this optimization.
Force_include.hpp includes macros which are used here. Also some compilers
have command line switches which can alter this behavior.

I'll look at this some more.

Robert Ramey

-----Original Message-----
From: Markus Schöpflin [mailto:markus.schoepflin_at_[hidden]]
Sent: Wednesday, July 06, 2005 6:58 AM
Subject: Re: TRU64 and serialization tests

Markus Schöpflin wrote:

> Robert Ramey wrote:

>>Is there a chance that one of the testers of TRU64 compilers could find a
>>little time to investigate the faiilures for the serialization tests?
>>
>>All the failures occur at runtime with a memory exception - I presume this
>>is an invalid or null pointer somewhere. It might be helpful for me to
know
>>on which source line(s) this exception occurs.
>>
>>These failures closely mirror the remaining failures with CW so I'm hoping
>>that finding this might have a beneficial effect on other compilers.
>>
>>In some compilers, it seems that some static variables are not
>>instanticiated as one would expect perhaps due to over-zealous
optimization
>>by removing static variables not explicitly refferred to by name. These
>>static variables are used by extended type info and void_cast.
>>
>>Any additional information would be much appreciated.

> Robert, I'm currently in the process of setting up the boost regression
> tests on a HP TestDrive machine. This has been made possible with kind
> permission from HP. This will give _much_ better turnaround times for the
> regression runs. Once this is done, I intend to change to template
> instantiation model of the compiler back to the default, so that static
> variables should no longer be a problem. Then we will see, what happens to

> the error in the serialization library.

The regression tests on the TestDrive machine are now up and running but
unfortunately the tests with the default instantiation mode didn't turn out
as I expected them to. :-(

Therefore I ran one of the tests in the debugger to see what's up. Here are
the results. Note the comment after stack frame #4.

schoepf_at_area51:/vol2/boost/results/bin/boost/libs/serialization/test/test_de
rived_class_ptr_text_archive.test/tru64cxx65-042/debug>
ladebug ./test_derived_class_ptr_text_archive
Welcome to the Ladebug Debugger Version 67 (built Apr 18 2002 for Compaq
Tru64 UNIX)
------------------
object file name: ./test_derived_class_ptr_text_archive
Reading symbolic information ...done

(ladebug) run
Running 1 test case...
Thread received signal SEGV
stopped at [void
boost::archive::detail::basic_oarchive_impl::save_pointer(class
boost::archive::detail::basic_oarchive&, const void*, const class
boost::archive::detail::basic_pointer_oserializer*):313 0x1200d765c]
     313 const basic_oserializer & bos =
bpos_ptr->get_basic_serializer();

(ladebug) print bpos_ptr
0x0

(ladebug) where
>0 0x1200d765c in
((basic_oarchive_impl*)0x1400984c0)->boost::archive::detail::basic_oarchive_
impl::save_pointer(ar=&
class boost::archive::detail::basic_oarchive { ... }, t=0x1400917c0,
bpos_ptr=0x0)
"/vol2/boost/boost/libs/serialization/build/../src/basic_oarchive.cpp":313
#1 0x1200d7de4 in
((basic_oarchive*)0x11fffb030)->boost::archive::detail::basic_oarchive::save
_pointer(t=0x1400917c0,
bpos_ptr=0x0)
"/vol2/boost/boost/libs/serialization/build/../src/basic_oarchive.cpp":419
Warning: unknown base type 48 at auxIndex 19 in file #114
(../libs/serialization/test/A.hpp)
The symbol [???] from file #0 (DebugInformationStrippedFromFile0) will not
have complete debug information available.
#2 0x120067a24 in
boost::archive::detail::save_pointer_type<boost::archive::text_oarchive,B*>:
:polymorphic<B>::save(ar=&
class boost::archive::text_oarchive { ... }, t=& class B { ... },
bpos_ptr=0x0) "/vol2/boost/boost/boost/archive/detail/oserializer.hpp":390
#3 0x120067b6c in
__7__CPR200__save__tm__3_1B__Q4_5boost7archive6detail61save_pointer_type__tm
__36_Q3_J19JJ25J13text_oarchiveP1BSFRQ3_J19JJ25JJ85JRCZ1_2ZPCQJ17JostJ25JJ33
J25basic_pointer_oserializer_v(ar=&
class boost::archive::text_oarchive { ... }, t=& class B { ... },
bpos_ptr=0x0) "/vol2/boost/boost/boost/archive/detail/oserializer.hpp":427
#4 0x120067be0 in
boost::archive::detail::save_pointer_type<boost::archive::text_oarchive,B*>:
:invoke(ar=&
class boost::archive::text_oarchive { ... }, t=0x1400917c0)
"/vol2/boost/boost/boost/archive/detail/oserializer.hpp":455

Here bpos_ptr is already 0, which is probably not ok. Therefore
register_type() seems to give a wrong result. But from here on I'm lost.
But maybe you can make something of this. Just tell me if you need any more
input on it.

Markus


Boost-testing list run by mbergal at meta-comm.com