public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "paolo.carlini at oracle dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug libstdc++/48750] for_each_template_random_access_ed has unbalanced new/delete[]
Date: Wed, 27 Apr 2011 20:26:00 -0000	[thread overview]
Message-ID: <bug-48750-4-OYHC73xkZO@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-48750-4@http.gcc.gnu.org/bugzilla/>

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48750

--- Comment #17 from Paolo Carlini <paolo.carlini at oracle dot com> 2011-04-27 20:23:25 UTC ---
Thanks Johannes. Indeed, I was still a little nervous about those bits of
losertree.h. If you can, please make sure that (even if it costs a bit of
performance):

  1- After memory allocation, the first time each objects is constructed, via
placement new, not assigned.
  2- All the following times are assigned, not constructed.
  3- All the object are destructed, once, by calling explicitly the destructor,
in the destructor of _LoserTree* class, before deallocating the memory via
operator delete. Careful not trying to destruct objects never constructed in
the first place.

In general, I recommend preparing a tiny snippet code exercising the parallel
code at issue and running it under valgrind (doing that yesterday for the
elements of a vector<string>, for sort, stable_sort, etc, turned out to be
rather "interesting" ;)

Please, keep me up to date, we want to resolve this for 4.6.1, I think.


  parent reply	other threads:[~2011-04-27 20:26 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-24 11:46 [Bug libstdc++/48750] New: " bugs at sehe dot nl
2011-04-24 11:51 ` [Bug libstdc++/48750] " bugs at sehe dot nl
2011-04-24 12:11 ` paolo.carlini at oracle dot com
2011-04-24 12:16 ` paolo.carlini at oracle dot com
2011-04-24 12:22 ` paolo.carlini at oracle dot com
2011-04-24 12:26 ` paolo.carlini at oracle dot com
2011-04-24 12:54 ` bugs at sehe dot nl
2011-04-24 21:52 ` paolo.carlini at oracle dot com
2011-04-24 22:14 ` paolo.carlini at oracle dot com
2011-04-26 15:21 ` paolo.carlini at oracle dot com
2011-04-26 18:09 ` t.h.shorrock at gmail dot com
2011-04-26 18:40 ` paolo.carlini at oracle dot com
2011-04-26 18:40 ` paolo.carlini at oracle dot com
2011-04-27  0:57 ` paolo.carlini at oracle dot com
2011-04-27  1:09 ` paolo.carlini at oracle dot com
2011-04-27  9:53 ` bugs at sehe dot nl
2011-04-27 11:17 ` bugs at sehe dot nl
2011-04-27 20:00 ` singler at gcc dot gnu.org
2011-04-27 20:26 ` paolo.carlini at oracle dot com [this message]
2011-04-28 16:40 ` rguenth at gcc dot gnu.org
2011-05-03 14:23 ` paolo at gcc dot gnu.org
2011-05-03 15:58 ` bugs at sehe dot nl
2011-05-03 18:03 ` paolo.carlini at oracle dot com
2011-05-03 18:12 ` paolo at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-48750-4-OYHC73xkZO@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).