Build errors and crash with 1.33.0 under Mac OS X CodeWarrior

Hi all, I just updated from boost 1.32.0 to 1.33.0 for a CodeWarrior MSL/carbon project under Mac OS X. There were several build errors stemming from the fact that "check" is already defined in /usr/include/AssertMacros.h. For now I dealt with this my modifying my copy of the boost libraries to substitute _check for check. This is of course an ugly solution, but I wanted to move forward. Unfortunately now I'm seeing crashes with code that worked fine with 1.32.0. Here's some test code that demonstrates the crash: _tprintf(_T("\nTest a vector of boost shared_ptr's:\n")); typedef boost::shared_ptrstd::string SharedPtrString; typedef vector<SharedPtrString> StringContainer; typedef vector<SharedPtrString>::iterator StringContainerIterator; { SharedPtrString sharedPtrString1(new std::string("Hi there!")); SharedPtrString sharedPtrString2(new std::string("Hi there!")); _tprintf( _T(" sharedPtrString1->c_str() = \"%s\"\n"), sharedPtrString1->c_str() ); _tprintf( _T(" sharedPtrString2->c_str() = \"%s\"\n"), sharedPtrString2->c_str() ); } // We never get here because of an access error Basically when the SharedPtrString goes out of scope, I get an access error deep in the allocation code. Does anyone have suggestions for resolving these issues? Note that I could go back to 1.32.0, but I want to use the new Pointer Container Library. Best regards, -- Allen Cronce

Hi all,
I just updated from boost 1.32.0 to 1.33.0 for a CodeWarrior MSL/carbon project under Mac OS X. There were several build errors stemming from the fact that "check" is already defined in /usr/include/AssertMacros.h. For now I dealt with this my modifying my copy of the boost libraries to substitute _check for check. This is of course an ugly solution, but I wanted to move forward.
What I do is in my precompiled header (after including

Hi Marshall,
OK. I suppose that's better than changing boost source.
But does undefing those macro's have any negative effects? Will asserts still work, for example? Sorry in advance for my ignorance of Mac assert plumbing ;-)
No, those macros are not used in any other header files. assert doesn't use them, either.
Also, any ideas regarding the crash?
No, unfortunately. :-( -- -- Marshall Marshall Clow Idio Software mailto:marshall@idio.com It is by caffeine alone I set my mind in motion. It is by the beans of Java that thoughts acquire speed, the hands acquire shaking, the shaking becomes a warning. It is by caffeine alone I set my mind in motion.

Unfortunately now I'm seeing crashes with code that worked fine with 1.32.0. Here's some test code that demonstrates the crash:
I believe there was a PowerPC specific bug in 1.33 which affected shared_ptr, it's been fixed in cvs, but I'm not sure which files you need to fix the issue. John.


But I have to say it's disturbing that a crasher in smart pointers, undoubtedly a very popular library, went undetected in an official release. Hopefully whatever QA hole that led to this has been plugged for future versions.
Well we're mighty embarressed, and yes we're trying to improve proceedures. John.
participants (3)
-
Allen Cronce
-
John Maddock
-
Marshall Clow