|
Boost Users : |
Subject: [Boost-users] regex instantiation crashes at program exit
From: Gianfranco Zuliani (gianfranco.zuliani_at_[hidden])
Date: 2013-04-23 10:25:17
Hi,
I get a crash when trying to instantiate a boost::regex during program shutdown. I've boiled down the code to this:
#include <boost/regex.hpp>
#include <boost/thread.hpp>
struct Object {
~Object() {
boost::regex param("a");
}
static Object& Instantiate() {
static boost::thread_specific_ptr<Object> theObject;
if (theObject.get() == 0)
theObject.reset(new Object);
return *theObject;
}
};
int main() {
Object::Instantiate();
boost::regex param("a");
return 0;
}
Program exists fine if I comment out the boost::regex instantiation in main.
I'm using Boost v. 1.42, Visual Studio 2008 Pro on Windows 7 SP1 64 bit. Test program is 64 bit too.
TIA, Gianfranco
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net