Boost C++ Libraries: Ticket #8843: bugs: xpressive: assertion begin!=end fails, instead of throwing an exception https://svn.boost.org/trac10/ticket/8843 <p> When a defect string ("\d<a class="report" href="https://svn.boost.org/trac10/report/4">{4}</a> [") is compiled to be a sregex, then an assertion fails, instead of an exception being thrown. This is only in debug mode: in release mode, an exception is thrown as expected. </p> <p> The full error message: </p> <pre class="wiki">Assertion failed! Program: myfolder/myexe.exe File: myfolder/boost_1_54_0/boost/xpressive/detail/dynamic/parse_charset.hpp, Line 201 Expression: begin != end </pre><p> The full code: </p> <pre class="wiki">#include &lt;iostream&gt; #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wunused-local-typedefs" #include &lt;boost/xpressive/xpressive.hpp&gt; #pragma GCC diagnostic pop int main() { try { boost::xpressive::sregex::compile("\\d{4} ["); } catch (boost::xpressive::regex_error&amp; e) { std::cout &lt;&lt; "OK\n"; return 0; } return 1; } </pre><p> The Qt Creator project file: </p> <pre class="wiki">TEMPLATE = app CONFIG += console CONFIG -= app_bundle CONFIG -= qt SOURCES += main.cpp QMAKE_CXXFLAGS += -std=c++11 -Wall -Wextra -Werror INCLUDEPATH += \ ../../Libraries/boost_1_54_0 CONFIG(release, debug|release) { DEFINES += NDEBUG } </pre><p> Technicalities: </p> <ul><li>Operating system: Windows Windows XP </li><li>IDE: Qt Creator 2.7.2 </li><li>Project type: Console application </li><li>C++ standard: C++11 </li><li>Compiler(s): G++ 4.8.0 </li><li>Library used: Boost: version 1.54.0 </li></ul><p> The full Qt Creator project is added to this ticket. </p> <p> Thanks for Boost.Xpressive! </p> <p> Richel Bilderbeek </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/8843 Trac 1.4.3 richelbilderbeek@… Thu, 18 Jul 2013 07:32:31 GMT attachment set https://svn.boost.org/trac10/ticket/8843 https://svn.boost.org/trac10/ticket/8843 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">CppRuntimeErrorAssertionFailedXpressiveDetailDynamicParse_charset201.zip</span> </li> </ul> <p> CppRuntimeErrorAssertionFailedXpressiveDetailDynamicParse_charset201 error </p> Ticket Eric Niebler Fri, 19 Jul 2013 21:05:53 GMT status changed https://svn.boost.org/trac10/ticket/8843#comment:1 https://svn.boost.org/trac10/ticket/8843#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">assigned</span> </li> </ul> <p> Oh huh. Sounds like a bug. Thanks for the report. I'll look into it. </p> Ticket Eric Niebler Tue, 23 Jul 2013 03:22:02 GMT <link>https://svn.boost.org/trac10/ticket/8843#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/8843#comment:2</guid> <description> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/85118" title="throw instead of assert at incomplete charset, refs #8843">[85118]</a>) throw instead of assert at incomplete charset, refs <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/8843" title="#8843: Bugs: bugs: xpressive: assertion begin!=end fails, instead of throwing an ... (closed: fixed)">#8843</a> </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Eric Niebler</dc:creator> <pubDate>Thu, 22 Aug 2013 19:50:56 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/8843#comment:3 https://svn.boost.org/trac10/ticket/8843#comment:3 <ul> <li><strong>status</strong> <span class="trac-field-old">assigned</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/85427" title="merge [85118],[85119],[85120],[85121] from trunk; fixes #8843, fixes ...">[85427]</a>) merge <a class="changeset" href="https://svn.boost.org/trac10/changeset/85118" title="throw instead of assert at incomplete charset, refs #8843">[85118]</a>,<a class="changeset" href="https://svn.boost.org/trac10/changeset/85119" title="remove unused local typedef, refs #8880">[85119]</a>,<a class="changeset" href="https://svn.boost.org/trac10/changeset/85120" title="use RAII instead of try/catch in sequence_stack.hpp, refs #8882">[85120]</a>,<a class="changeset" href="https://svn.boost.org/trac10/changeset/85121" title="make xpressive play nice with clang's -Wimplicit-fallthrough ...">[85121]</a> from trunk; fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/8843" title="#8843: Bugs: bugs: xpressive: assertion begin!=end fails, instead of throwing an ... (closed: fixed)">#8843</a>, fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/8880" title="#8880: Bugs: [xpressive] GCC 4.8+ warns about unused local typedef (closed: fixed)">#8880</a>, fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/8882" title="#8882: Patches: sequence_stack.hpp doesn't build without exception support (closed: fixed)">#8882</a>, fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/8474" title="#8474: Patches: Make Boost.xpressive compatible with Clang's -Wimplicit-fallthrough ... (closed: fixed)">#8474</a> </p> Ticket