Boost logo

Boost :

From: Jeremy Pack (rostovpack_at_[hidden])
Date: 2007-11-26 22:36:19


I've been getting the same problem - the following code reproduces it
on an Intel mac:

// Copyright 2007 Jeremy Pack
// All rights reserved

#define BOOST_TEST_MAIN
#define BOOST_TEST_DYN_LINK 1
#include <boost/test/unit_test.hpp>
#include <iostream>

// #include "../src/paf_ged_loader.hpp"
// #include "../src/repository.hpp"
#include <boost/regex.hpp>

BOOST_AUTO_TEST_CASE(regex) {
  boost::regex i("test");
  std::string s("test");
  boost::smatch match;
  boost::regex_match(s, match, i);
}

The system_error seems to be thrown at the call to regex_match.

However, if I add the header
#include <boost/test/execution_monitor.hpp>, the problems disappear.
I've tested this in multiple files. It always dies on regex_match,
unless I include boost/test/execution_monitor.hpp.

Jeremy Pack

On Nov 23, 2007 6:59 AM, Gennadiy Rozental <rogeeff_at_[hidden]> wrote:
>
> "John Maddock" <john_at_[hidden]> wrote in message
> news:007f01c82db1$0a7e2680$0f8e0252_at_fuji...
> > Gennadiy Rozental wrote:
> >> The link now shows boost::thread_resource_error as a thrown
> >> exception. I am afraid I would have problems figuring this out even
> >> if it was boost.test exception. I need an access to the platform to
> >> debug it. The only thing I can tell immediately is that system_error is
> >> caught by
> >> execution_monitor itself (see line ~ execution_monitor.ipp:1110). So
> >> it should be some strange combination of events to produce
> >> system_error from execution monitor invocation
> >
> > Yep, these exceptions seem to be comming and going, which is rather
> > frustrating to say the least. Currently this one:
> > http://tinyurl.com/3xx3o7
> > is showing:
>
> I don't believe it have something to do with Boost.Test per say.
>
> > terminate called after throwing an instance of 'boost::system_error'
> >
> > EXIT STATUS: 134
> >
> > So the exception is raised even before cpp_main is entered and before
> > execution monitor's own try...catch blocks are entered I assume?
>
> Yes.
>
> Here are all the places where syste error may've come from:
>
> execution_monitor.ipp(532): BOOST_TEST_SYS_ASSERT( ::sigaction( m_sig ,
> sigaction_ptr(), &m_new_action ) != -1 );
> execution_monitor.ipp(542): BOOST_TEST_SYS_ASSERT( sigemptyset(
> &m_new_action.sa_mask ) != -1 );
> execution_monitor.ipp(549): BOOST_TEST_SYS_ASSERT( ::sigaction( m_sig,
> &m_new_action, &m_old_action ) != -1 );
> execution_monitor.ipp(642): BOOST_TEST_SYS_ASSERT( ::sigaltstack( 0,
> &sigstk ) != -1 );
> execution_monitor.ipp(648): BOOST_TEST_SYS_ASSERT(
> ::sigaltstack( &sigstk, 0 ) != -1 );
> execution_monitor.ipp(667): BOOST_TEST_SYS_ASSERT( ::sigaltstack(
> &sigstk, 0 ) != -1 );
> execution_monitor.ipp(696): BOOST_TEST_SYS_ASSERT( ::signal( sig,
> SIG_DFL ) != SIG_ERR );
>
> What you can do is to try catch the exception in your code and report it
> yourself. This may at least show some information. I guess I should also
> include failed expression text. It's not there yet.
>
> Gennadiy
>
>
>
>
> _______________________________________________
> Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
>


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk