Subject: [Boost-bugs] [Boost C++ Libraries] #8843: bugs: xpressive: assertion begin!=end fails, instead of throwing an exception
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-07-18 07:31:54
#8843: bugs: xpressive: assertion begin!=end fails, instead of throwing an
exception
-------------------------------------+--------------------------
Reporter: richelbilderbeek@⦠| Owner: eric_niebler
Type: Bugs | Status: new
Milestone: To Be Determined | Component: xpressive
Version: Boost 1.54.0 | Severity: Problem
Keywords: xpressive debug release |
-------------------------------------+--------------------------
When a defect string ("\d{4} [") 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.
The full error message:
{{{
Assertion failed!
Program: myfolder/myexe.exe
File:
myfolder/boost_1_54_0/boost/xpressive/detail/dynamic/parse_charset.hpp,
Line 201
Expression: begin != end
}}}
The full code:
{{{
#include <iostream>
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-local-typedefs"
#include <boost/xpressive/xpressive.hpp>
#pragma GCC diagnostic pop
int main()
{
try
{
boost::xpressive::sregex::compile("\\d{4} [");
}
catch (boost::xpressive::regex_error& e)
{
std::cout << "OK\n";
return 0;
}
return 1;
}
}}}
The Qt Creator project file:
{{{
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
}
}}}
Technicalities:
* Operating system: Windows Windows XP
* IDE: Qt Creator 2.7.2
* Project type: Console application
* C++ standard: C++11
* Compiler(s): G++ 4.8.0
* Library used: Boost: version 1.54.0
The full Qt Creator project is added to this ticket.
Thanks for Boost.Xpressive!
Richel Bilderbeek
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/8843> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:13 UTC