pb_ds debug mode patch
Benjamin Kosnik
bkoz@redhat.com
Fri May 6 17:27:00 GMT 2011
> I have also made progress on those issues and found mostly
> problems in places where assert_valid is called in ov_tree_data_
> implementation.
Right. I have debug rand testfiles now that unroll the metaprogramming
a bit and make per-policy errors more obvious.
> - assert_valid is called in update private method that is sometimes
> used before the debug part as been updated. To fix those assertion I
> simply remove assert_valid call in update method because there is
> always a call to assert_valid following the update call.
Yep.
> - assert_valid in call in ov_tree_data destructor but in
> ov_treee_data_ split there are temporary ov_tree_data_ instances that
> are used with value_swap that leave the instance in an inconsistent
> state resulting in the assertion. Once again I prefered to remove the
> assert_valid call in the destructor
OK.
> I also notice a problem with debug_base::join that also clean
> the source while joining. In ov_tree_data_ it is a problem because
> the 'other' instance becomes inconsistent after the call to
> debug_base::join and the call to clear that follows perform a
> assert_valid that fails.
Right, this is what I see in a debugger as well.
> There are other similar issues that I will detailed when sending a
> new version of the patch tomorrow I think.
Ah. Great.....One thing I noticed is that there is a lot of
repetition of the debug macros in your first patch. You can cut down on
this is you put the commonly used macros in
detail/container_base_dispatch.cpp
-benjamin
More information about the Libstdc++
mailing list