public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "redi at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug libstdc++/67903] std::locale compatibility between gcc4.9 and gcc5.1
Date: Fri, 09 Oct 2015 12:02:00 -0000 [thread overview]
Message-ID: <bug-67903-4-HGpGoFtD6k@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-67903-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67903
--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Yucheng Low from comment #0)
> This would not be a problem if not for the fact that:
> - the global locale is initialized with an inplace new:
> locale_init.cc:378
> _M_facets = new (&facet_vec) const facet*[_M_facets_size];
> _M_caches = new (&cache_vec) const facet*[_M_facets_size];
> - the locale inserter (locale_init.cc:354) correctly checks when it
> should
> extend the _M_facets, but happily just deletes the old array.
> locale.cc:348
> delete [] __oldf;
> delete [] __oldc;
> - which of course fails gloriously with the inplace new.
>
> - The solution is to actually do the resize correctly and check when we
> do not actually need to delete.
A better check might be to compare the pointers with the buffers used for the
placement new.
next prev parent reply other threads:[~2015-10-09 12:02 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-08 22:44 [Bug libstdc++/67903] New: " ylow at graphlab dot com
2015-10-09 8:09 ` [Bug libstdc++/67903] " rguenth at gcc dot gnu.org
2015-10-09 12:02 ` redi at gcc dot gnu.org [this message]
2015-10-09 12:04 ` redi at gcc dot gnu.org
2015-10-09 17:10 ` ylow at graphlab dot com
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-67903-4-HGpGoFtD6k@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).