public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/63199] New: Inserting std::wregex to std::vector looses some std::wregex values
@ 2014-09-07 17:56 stefan at schweter dot it
2014-09-07 17:56 ` [Bug libstdc++/63199] " stefan at schweter dot it
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: stefan at schweter dot it @ 2014-09-07 17:56 UTC (permalink / raw)
To: gcc-bugs
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.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libstdc++/63199] Inserting std::wregex to std::vector looses some std::wregex values
2014-09-07 17:56 [Bug libstdc++/63199] New: Inserting std::wregex to std::vector looses some std::wregex values stefan at schweter dot it
@ 2014-09-07 17:56 ` 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
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: stefan at schweter dot it @ 2014-09-07 17:56 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63199
--- Comment #1 from Stefan Schweter <stefan at schweter dot it> ---
Created attachment 33457
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33457&action=edit
GDB trace for regex_vectpr
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libstdc++/63199] Inserting std::wregex to std::vector loses some std::wregex values
2014-09-07 17:56 [Bug libstdc++/63199] New: Inserting std::wregex to std::vector looses some std::wregex values stefan at schweter dot it
2014-09-07 17:56 ` [Bug libstdc++/63199] " stefan at schweter dot it
@ 2014-09-08 8:46 ` redi at gcc dot gnu.org
2014-09-25 4:44 ` timshen at gcc dot gnu.org
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: redi at gcc dot gnu.org @ 2014-09-08 8:46 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63199
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |ASSIGNED
Last reconfirmed| |2014-09-08
Assignee|unassigned at gcc dot gnu.org |timshen at gcc dot gnu.org
Ever confirmed|0 |1
--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Tim has found the problem:
https://gcc.gnu.org/ml/libstdc++/2014-09/msg00020.html
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libstdc++/63199] Inserting std::wregex to std::vector loses some std::wregex values
2014-09-07 17:56 [Bug libstdc++/63199] New: Inserting std::wregex to std::vector looses some std::wregex values stefan at schweter dot it
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
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: timshen at gcc dot gnu.org @ 2014-09-25 4:44 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63199
--- Comment #3 from Tim Shen <timshen at gcc dot gnu.org> ---
Author: timshen
Date: Thu Sep 25 04:43:19 2014
New Revision: 215578
URL: https://gcc.gnu.org/viewcvs?rev=215578&root=gcc&view=rev
Log:
PR libstdc++/63199
* include/bits/regex.h (basic_regex::basic_regex, basic_regex::assign,
basic_regex::imbue, basic_regex::getloc, basic_regex::swap): Add
_M_loc for basic_regex.
* include/bits/regex_automaton.h: Add _M_traits for _NFA.
* include/bits/regex_compiler.h (_Compiler::_M_get_nfa, __compile_nfa):
Make _Compiler::_M_nfa heap allocated.
* include/bits/regex_compiler.tcc (_Compiler::_Compiler): Make
_Compiler::_M_nfa heap allocated.
* include/bits/regex_executor.h (_Executor::_M_is_word):
Fix accessing _M_traits.
* include/bits/regex_executor.tcc (_Executor::_M_dfs):
Fix accessing _M_traits.
* testsuite/28_regex/algorithms/regex_match/ecma/wchar_t/63199.cc:
New testcase.
Added:
trunk/libstdc++-v3/testsuite/28_regex/algorithms/regex_match/ecma/wchar_t/63199.cc
Modified:
trunk/libstdc++-v3/ChangeLog
trunk/libstdc++-v3/include/bits/regex.h
trunk/libstdc++-v3/include/bits/regex_automaton.h
trunk/libstdc++-v3/include/bits/regex_compiler.h
trunk/libstdc++-v3/include/bits/regex_compiler.tcc
trunk/libstdc++-v3/include/bits/regex_executor.h
trunk/libstdc++-v3/include/bits/regex_executor.tcc
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libstdc++/63199] Inserting std::wregex to std::vector loses some std::wregex values
2014-09-07 17:56 [Bug libstdc++/63199] New: Inserting std::wregex to std::vector looses some std::wregex values stefan at schweter dot it
` (2 preceding siblings ...)
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
5 siblings, 0 replies; 7+ messages in thread
From: timshen at gcc dot gnu.org @ 2014-10-02 16:51 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63199
--- Comment #4 from Tim Shen <timshen at gcc dot gnu.org> ---
Author: timshen
Date: Thu Oct 2 16:50:39 2014
New Revision: 215805
URL: https://gcc.gnu.org/viewcvs?rev=215805&root=gcc&view=rev
Log:
PR libstdc++/63199
* include/bits/regex.h (basic_regex::basic_regex, basic_regex::assign,
basic_regex::swap): Fix dangling _M_traits reference problem.
* testsuite/28_regex/algorithms/regex_match/ecma/wchar_t/63199.cc:
New test case.
Added:
branches/gcc-4_9-branch/libstdc++-v3/testsuite/28_regex/algorithms/regex_match/ecma/wchar_t/63199.cc
Modified:
branches/gcc-4_9-branch/libstdc++-v3/ChangeLog
branches/gcc-4_9-branch/libstdc++-v3/include/bits/regex.h
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libstdc++/63199] Inserting std::wregex to std::vector loses some std::wregex values
2014-09-07 17:56 [Bug libstdc++/63199] New: Inserting std::wregex to std::vector looses some std::wregex values stefan at schweter dot it
` (3 preceding siblings ...)
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
5 siblings, 0 replies; 7+ messages in thread
From: timshen at gcc dot gnu.org @ 2014-11-28 20:25 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63199
Tim Shen <timshen at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #5 from Tim Shen <timshen at gcc dot gnu.org> ---
Mark as resolved
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libstdc++/63199] Inserting std::wregex to std::vector loses some std::wregex values
2014-09-07 17:56 [Bug libstdc++/63199] New: Inserting std::wregex to std::vector looses some std::wregex values stefan at schweter dot it
` (4 preceding siblings ...)
2014-11-28 20:25 ` timshen at gcc dot gnu.org
@ 2023-07-20 10:29 ` redi at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: redi at gcc dot gnu.org @ 2023-07-20 10:29 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63199
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |5.0
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2023-07-20 10:29 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-07 17:56 [Bug libstdc++/63199] New: Inserting std::wregex to std::vector looses some std::wregex values stefan at schweter dot it
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
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).