id summary reporter owner description type status milestone component version severity resolution keywords cc 5911 Crash in Boost::regex when _GLIBCXX_DEBUG is defined noloader@… John Maddock "Regex matching experiences a crash when _GLIBCXX_DEBUG is defined. The crash was confirmed on multiple platforms, including Ubuntu, Fedora, and openBSD. Full compiler command: g++ -D_GLIBCXX_DEBUG -DDEBUG=1 -g3 -ggdb -O0 regex-test.cpp -o regex-test.exe -lboost_regex $ cat regex-test.cpp #include int main(int, char**) { const boost::regex re(""^[a-zA-Z]*""); bool match = boost::regex_match(""asdf"",re); return (int) !match; } $ ./regex-test.exe Segmentation fault (core dumped) $ gdb ./regex-test.exe GNU gdb 6.3 Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type ""show copying"" to see the conditions. There is absolutely no warranty for GDB. Type ""show warranty"" for details. This GDB was configured as ""i386-unknown-openbsd4.9""... (gdb) r Starting program: /home/jeffrey/Desktop/regex-test.exe Program received signal SIGSEGV, Segmentation fault. 0x01c6fc26 in __gnu_debug::_Safe_iterator_base::_M_detach_single ( this=0x3c0000f9) at /usr/src/gnu/lib/libstdc++-v3/../../gcc/libstdc++-v3/src/debug.cc:242 242 _M_prior->_M_next = _M_next; (gdb) bt full #0 0x01c6fc26 in __gnu_debug::_Safe_iterator_base::_M_detach_single ( this=0x3c0000f9) at /usr/src/gnu/lib/libstdc++-v3/../../gcc/libstdc++-v3/src/debug.cc:242 No locals. #1 0x01c710be in __gnu_debug::_Safe_sequence_base::_M_detach_all ( this=0xcfbd3a60) at /usr/src/gnu/lib/libstdc++-v3/../../gcc/libstdc++-v3/src/debug.cc:118 __iter = (__gnu_debug::_Safe_iterator_base *) 0x65707974 #2 0x1c00807b in ~_Safe_sequence_base (this=0xcfbd3a60) at safe_base.h:185 No locals. #3 0x1c00808f in ~_Safe_sequence (this=0xcfbd3a60) at safe_sequence.h:103 No locals. #4 0x1c0080a9 in ~vector (this=0xcfbd3a54) at vector:101 No locals. #5 0x1c008194 in ~match_results (this=0xcfbd3a54) at match_results.hpp:103 No locals. #6 0x1c008655 in boost::regex_match > > (str=0x3c0000f9 ""asdf"", e=@0xcfbd3ac4, flags=boost::regex_constants::match_default) at regex_match.hpp:90 m = { m_subs = {,std::allocator > >> = {,std::allocator > >> = { _M_impl = { >> = {<__gnu_cxx::new_allocator >> = {}, }, _M_start = 0x88c4f100, _M_finish = 0x88c4f124, _M_end_of_storage = 0x88c4f124}}, }, <__gnu_debug::_Safe_sequence, std::allocator > > >> = {<__gnu_debug::_Safe_sequence_base> = { _M_iterators = 0x3c0000f9, _M_const_iterators = 0x0, _M_version = 1}, }, _M_guaranteed_capacity = 0}, m_base = 0x85509400 ""x\177�'"", m_null = {> = {first = 0x3c0000fd """", second = 0x3c0000fd """"}, matched = false}, m_named_subs = {px = 0x0, pn = {pi_ = 0x0}}, m_last_closed_paren = 0, m_is_singular = false} #7 0x1c005324 in main () at regex-test.cpp:8 re = { = {}, m_pimpl = { px = 0x85509400, pn = {pi_ = 0x8ab55140}}} match = 28 (gdb)" Bugs closed To Be Determined regex Boost 1.47.0 Problem wontfix regex match crash