Boost logo

Boost :

From: Markus Schöpflin (markus.schoepflin_at_[hidden])
Date: 2006-03-13 08:26:05


Joaquín Mª López Muñoz wrote:

> Hello Markus
>
> Markus Schöpflin ha escrito:
>
>> JOAQUIN LOPEZ MU?Z wrote:
>>
>> [...]
>>
>>> The test used to work, but has hundergone a significant
>>> change that I've got the hunch might be related to
>>> its currently failing: previously all serialization
>>> tests were performed in a single translation unit
>>> named test_serialization.cpp, while now the code has
>>> been split (for reasons irrelevant to this discussion) into
>>> two files test_serialization1.cpp and test_serialization2.cpp.
>>> Does this ring some bell?
>> [...]
>>
>> This is most probably caused by having multiple instances of some static
>> object, which in turn is caused by a limitation of the template
>> instantiation model used. (All automatically instantiated templates are
>> placed in the output object and given internal linkage.)
>>
>> If you can identify the static object in question, adding a manual
>> instantiation of the enclosing template will work around this, because
>> those will be placed in an external template repository with external linkage.
>
> That's precisely what I'd like to ask you :) Could you trap the assertion
> and dump the stack trace? Hopefully, that'll reveal the type of the
> object which is causing the problem.

(ladebug) where
>0 0x3ff800ed6d8 in __kill(...) in /usr/shlib/libc.so
#1 0x3ff80220090 in UnknownProcedure18FromFile10(...) in /usr/shlib/libc.so
#2 0x3ff80140234 in __tis_raise(...) in /usr/shlib/libc.so
#3 0x3ff801d21f8 in abort(...) in /usr/shlib/libc.so
#4 0x3ff801d1c60 in __assert(...) in /usr/shlib/libc.so
#5 0x3ffbfdf17f0 in
boost::serialization::detail::tkmap::insert(eti=0x1400503e8)
"../../../libs/serialization/src/extended_type_info.cpp":74
#6 0x3ffbfdf211c in
((extended_type_info*)0x1400503e8)->boost::serialization::extended_type_info::self_register()
"../../../libs/serialization/src/extended_type_info.cpp":227
#7 0x12010bf90 in
((extended_type_info_typeid_1<constboost::multi_index::detail::index_node_base<int>
>*)0x1400503e8)->boost::serialization::detail::extended_type_info_typeid_1<constboost::multi_index::detail::index_node_base<int>
>::extended_type_info_typeid_1()
"../../../boost/serialization/extended_type_info_typeid.hpp":77
#8 0x12010c99c in
boost::serialization::detail::extended_type_info_typeid_1<constboost::multi_index::detail::index_node_base<int>
>::get_instance()
"../../../boost/serialization/extended_type_info_typeid.hpp":96
#9 0x120113664 in
((pointer_oserializer<boost::multi_index::detail::index_node_base<int>,boost::archive::text_oarchive>*)0x1400502a0)->boost::archive::detail::pointer_oserializer<boost::multi_index::detail::index_node_base<int>,boost::archive::text_oarchive>::pointer_oserializer()
"../../../boost/archive/detail/oserializer.hpp":220
#10 0x120120b98 in __init_sti__test_serialization2_cpp_dadc3ca5()
"../../../boost/archive/detail/oserializer.hpp":197
#11 0x120160fb8 in
../../../bin.v2/libs/multi_index/test/test_serialization.test/hp_cxx-71_006_tru64/debug/test_serialization
#12 0x3ff800069b0

>
>> I had a quick look at the code but as I don't know a thing about either
>> serialization or multi_index, I'm afraid I won't be of much help with
>> finding the problematic code.
>
> As for Boost.MultiIndex, there's no static object involved neither
> in the lib nor the tests, AFAIK, but if you could get that stacktrace
> we could tell better.

I had a look at extended_type_info_typeid_1::get_instance::instance and
oserializer::instantiate::instance but those look correct. Hmmm...

Markus


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