|
Boost Testing : |
From: Robert Ramey (ramey_at_[hidden])
Date: 2005-07-08 12:55:34
I believe that here is where the problem starts:
Note: line numbers slightly off
Oserializer.hpp(460)
const basic_pointer_oserializer * bpos_ptr = register_type(ar, * t)
// returns NULL
Since T is B which is not abstract - the above calls
Interface_oarchive.hpp(60)
template<class T>
const basic_pointer_oserializer * register_type(const T * t = NULL){
const basic_pointer_oserializer & bpos =
instantiate_pointer_oserializer(
static_cast<Archive *>(NULL),
static_cast<T *>(NULL)
);
this->This()->register_basic_serializer(bpos.get_basic_serializer());
return & bpos;
}
Oserializer.hpp(508)
template<class Archive, class T>
BOOST_DLLEXPORT inline const basic_pointer_oserializer &
instantiate_pointer_oserializer(
Archive * /* ar = NULL */,
T * /* t = NULL */
){
// note: reversal of order of arguments to work around msvc 6.0 bug
// that manifests itself while trying to link.
return
#if defined(__MSVC__) && (_MSC_VER <= 1300)
pointer_oserializer<T, Archive>::instance;
#else
pointer_oserializer<T, Archive>::instantiate();
#endif
}
So pointer_oserializer<T, Archive>::instance is a NULL or something like
that. The static instance isn't getting instantiated at pre-main time as it
should.
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