[Boost-bugs] [Boost C++ Libraries] #5712: terminate called recursively with filesystem header

Subject: [Boost-bugs] [Boost C++ Libraries] #5712: terminate called recursively with filesystem header
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2011-07-18 22:15:37


#5712: terminate called recursively with filesystem header
--------------------------------------------------------+-------------------
 Reporter: philipp.kraus@… | Owner: bemandawes
     Type: Bugs | Status: new
Milestone: | Component: filesystem
  Version: Boost 1.47.0 | Severity: Problem
 Keywords: exception filesystem terminate recursively |
--------------------------------------------------------+-------------------
 Hello,

 I'm using boost::filesystem within my project (boost 1.47.0). I have
 compiled the boost under cygwin with bjam. I have some problems with
 exception throws / catches:
 The following example shows the problem:

 #include <stdexcept>
 #include <boost/filesystem.hpp>

 int main(int argc, char* argv[]) {
     throw std::runtime_error("xxx");
     return 0;
 }

 If I compile this code under Cygwin and link cygboost_filesystem,
 cygboost_system and libbost_exception, the programs terminates with this
 messages:
 terminate called after throwing an instance of 'std::runtime_error'
 terminate called recursively

 If I remove the boost/filesystem include the program produce the correct
 message:
 terminate called after throwing an instance of 'std::runtime_error'
   what(): xxx


 If I change the program to:

 int main(int argc, char* argv[]) {
         try {
                 throw std::runtime_error("xxx");
         } catch (...) {}
         return 0;
 }

 the program breaks down with the filesystem include:
 terminate called after throwing an instance of 'std::runtime_error'
 terminate called recursively

 without the include always works fine.


 Thanks a lot

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/5712>
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:07 UTC