Boost logo

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

        const basic_pointer_oserializer * bpos_ptr = register_type(ar, * t)
                // returns NULL
Since T is B which is not abstract - the above calls

    template<class T>
    const basic_pointer_oserializer * register_type(const T * t = NULL){
        const basic_pointer_oserializer & bpos =
                static_cast<Archive *>(NULL),
                static_cast<T *>(NULL)
        return & bpos;


template<class Archive, class T>
BOOST_DLLEXPORT inline const basic_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.
    #if defined(__MSVC__) && (_MSC_VER <= 1300)
        pointer_oserializer<T, Archive>::instance;
        pointer_oserializer<T, Archive>::instantiate();

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

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
>>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
>>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.

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&, const void*, const class
boost::archive::detail::basic_pointer_oserializer*):313 0x1200d765c]
     313 const basic_oserializer & bos =

(ladebug) print bpos_ptr

(ladebug) where
>0 0x1200d765c in
class boost::archive::detail::basic_oarchive { ... }, t=0x1400917c0,
#1 0x1200d7de4 in
Warning: unknown base type 48 at auxIndex 19 in file #114
The symbol [???] from file #0 (DebugInformationStrippedFromFile0) will not
have complete debug information available.
#2 0x120067a24 in
class boost::archive::text_oarchive { ... }, t=& class B { ... },
bpos_ptr=0x0) "/vol2/boost/boost/boost/archive/detail/oserializer.hpp":390
#3 0x120067b6c in
class boost::archive::text_oarchive { ... }, t=& class B { ... },
bpos_ptr=0x0) "/vol2/boost/boost/boost/archive/detail/oserializer.hpp":427
#4 0x120067be0 in
class boost::archive::text_oarchive { ... }, t=0x1400917c0)

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.


Boost-testing list run by mbergal at