public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "stefan at schweter dot it" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug libstdc++/63199] New: Inserting std::wregex to std::vector looses some std::wregex values
Date: Sun, 07 Sep 2014 17:56:00 -0000	[thread overview]
Message-ID: <bug-63199-4@http.gcc.gnu.org/bugzilla/> (raw)

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63199

            Bug ID: 63199
           Summary: Inserting std::wregex to std::vector looses some
                    std::wregex values
           Product: gcc
           Version: 4.9.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: stefan at schweter dot it

Created attachment 33456
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33456&action=edit
Example program

Hi,

using GCC 4.9.1 I can reproduce a strange behavior with inserting
std::wregex values to a std::vector.

I'm using a loop which creates some std::wregex with imbuing and assigning.

After compiling and executing the program code, a core dump is returned.
Having a deeper look with gdb into the std::vector I can see, that only
the half of the std::wregex values have been properly inserted -> see
the _M_original_str variable.

Used GCC:

[root@098bff401751 /]# LC_MESSAGES=C g++ -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.1/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: /build/gcc/src/gcc-4.9.1/configure --prefix=/usr
--libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man
--infodir=/usr/share/info --with-bugurl=https://bugs.archlinux.org/
--enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++ --enable-shared
--enable-threads=posix --with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions --enable-clocale=gnu --disable-libstdcxx-pch
--disable-libssp --enable-gnu-unique-object --enable-linker-build-id
--enable-cloog-backend=isl --disable-isl-version-check
--disable-cloog-version-check --enable-lto --enable-plugin
--enable-install-libiberty --with-linker-hash-style=gnu --disable-multilib
--disable-werror --enable-checking=release
Thread model: posix
gcc version 4.9.1 (GCC)


I compiled the program with:

g++ -g -std=c++11 std_regex.cpp

I also attached the example code and the gdb trace for the used regex_vector.


             reply	other threads:[~2014-09-07 17:56 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-07 17:56 stefan at schweter dot it [this message]
2014-09-07 17:56 ` [Bug libstdc++/63199] " stefan at schweter dot it
2014-09-08  8:46 ` [Bug libstdc++/63199] Inserting std::wregex to std::vector loses " redi at gcc dot gnu.org
2014-09-25  4:44 ` timshen at gcc dot gnu.org
2014-10-02 16:51 ` timshen at gcc dot gnu.org
2014-11-28 20:25 ` timshen at gcc dot gnu.org
2023-07-20 10:29 ` redi 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-63199-4@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).