
I recently upgrade from boost 1.42 to 1.43. All of a sudden, the project I
was working on seems to be throwing an exception before main() is called. I
was able to reproduce this error in the example below. Using 1.42, it
executes just fine. Using 1.43, an exception is thrown before main is
reached.
In some of my classes, I have a static mutex variable that I lock before I
manipulate other static variables in the class (as seen below).
main.cpp - Start
#include "Test.hpp"
int main()
{
Test test;
return 0;
}
main.cpp - End
Test.hpp - Start
#ifndef DEFINE_TEST_HPP
#define DEFINE_TEST_HPP
#include
BoostTest.exe!boost::copy_exceptionboost::exception_detail::bad_alloc_( const boost::exception_detail::bad_alloc_ & e) Line 47 C++
BoostTest.exe!boost::exception_detail::get_bad_alloc<42>() Line 80 + 0x9f bytes C++ BoostTest.exe!`dynamic initializer for 'boost::exception_detail::exception_ptr_bad_alloc<42>::e''() Line 94 + 0x28 bytes C++ msvcr100d.dll!_initterm(void (void)* * pfbegin, void (void)* * pfend) Line 873 C BoostTest.exe!__tmainCRTStartup() Line 473 + 0xf bytes C BoostTest.exe!mainCRTStartup() Line 371 C kernel32.dll!@BaseThreadInitThunk@12() + 0x12 bytes ntdll.dll!___RtlUserThreadStart@8() + 0x27 bytes ntdll.dll!__RtlUserThreadStart@8() + 0x1b bytes Did something change between 1.42 and 1.43 that would cause this? -Rob Yull