pb_ds debug mode patch

François Dumont francois.cppdevs@free.fr
Fri Mar 25 21:49:00 GMT 2011


Hi

     This is a first proposition of patch to the pb_ds debug mode to 
enhance assertion messages. I was surprised to discover thanks to it 
some issues in the debug part of pb_ds code that was not shown previously:
- invalid call to the debug_base copy constructor in 
cc_hash_table_map_/constructor_destructor_fn_imps.hpp making the global 
state of the object invalid on the first assert_valid call
- idem in pb_ds/detail/ov_tree_map_/constructors_destructor_fn_imps.hpp
- invalid assertion in pb_ds/detail/list_update_map_/erase_fn_imps.hpp 
erase_after method, it can be called on m_p_l

However I still have failures that I can't resolved for the moment:
FAIL: ext/pb_ds/regression/tree_data_map_rand.cc execution test
FAIL: ext/pb_ds/regression/tree_no_data_map_rand.cc execution test

Each time the problem is:
/home/fdt/dev/gcc-trunk-build/x86_64-unknown-linux-gnu/libstdc++-v3/include/ext/pb_ds/detail/ov_tree_map_/constructors_destructor_fn_imps.hpp:247: 
check_size 13 != 4

debug container is not maintained correctly but I can't find where it 
come from. Anyone can have a try ?

What I can't explain neither is why those problems are appearing with 
this patch.

Regards
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pb_ds_debug.patch
Type: text/x-patch
Size: 222358 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20110325/4f7352af/attachment.bin>


More information about the Libstdc++ mailing list