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++/63631] std::regex_match yielding inexplicable garbage; invalid reads in valgrind Date: Thu, 23 Oct 2014 17:03:00 -0000 [thread overview] Message-ID: <bug-63631-4-uizTgQ8rPm@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-63631-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63631 Jonathan Wakely <redi at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|FIXED |INVALID --- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> --- sregex_iterator::operator->() yields a smatch_results and smatch_results::str() yields a temporary string. The reason is that smatch_results doesn't contain strings, it contains iterators into some other string. When you want to retrieve a match it constructs a new string from the relevant iterators. That avoids having to construct all the strings up front when they may never be needed.
prev parent reply other threads:[~2014-10-23 16:59 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2014-10-23 16:28 [Bug c++/63631] New: " meme01 at eaku dot net 2014-10-23 16:59 ` [Bug libstdc++/63631] " meme01 at eaku dot net 2014-10-23 17:03 ` redi at gcc dot gnu.org [this message]
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-63631-4-uizTgQ8rPm@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: linkBe 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).