[PATCH][libstdc++-v3 parallel mode] Default constructor/placement new issues

Benjamin Kosnik bkoz@redhat.com
Wed Nov 28 16:06:00 GMT 2007


> Chris Jefferson brought a problem of incorrect (de)construction
> because of raw allocation + placement new to my attention. So I
> checked the whole code for similar problems and fixed them. One
> remains (not easy to fix), but in a variant that is by default
> deactivated (and might get thrown out anyway).

Thanks for doing a complete audit: I like to see a thorough job!

Before you check this patch in, can you comment the one remaining place?
Something like

// XXX incorrect (de)construction

would be perfect.

> 2007-11-28  Johannes Singler  <singler@ira.uka.de>
> 
>         * include/parallel/multiway_merge.h:
>            Destruct only elements that were have been constructed
> before Code beautifying and formatting

	* include/parallel/multiway_merge.h: Destruct only elements
        that were have been constructed before. Code beautifying and
        formatting.

End with a period.

>         * include/parallel/losertree.h:
>            (Copy) construct all loser tree item keys, so they can be
>            deconstructed all at once
>         * include/parallel/quicksort.h: Fix memory leak
>         * include/parallel/random_shuffle.h:
>             Use copy constructor instead of assignment
>             Code beautifying and formatting
>         * include/parallel/unique_copy.h:
>             Use assignment instead of copy constructor
>         * include/parallel/multiway_mergesort.h:
>             Use copy constructor instead of assignment
>             Code beautifying and formatting
>         * include/parallel/random_shuffle.h:
>             Use copy constructor instead of assignment
>             Code beautifying

This patch looks good, thanks.

For the ChangeLog entry, try to match the emacs-centric formatting that
other entries use: this looks a little off, but maybe it's just
cut-paste or mailer error. 

best,
benjamin



More information about the Libstdc++ mailing list