I am experiencing some strange errors in a multi-threaded environment on MAC OS X, dual core. I am receiving segfaults, bus errors and illegal instruction crashes regularily with simple calls to boost::format operations. Disabling one of the cores on my machine will completely remove the errors (just fyi). If I add a mutex lock around the calls to boost::format in my sample code (inside the for loop of threadRun) then no problems occur.
The following code can be used to reproduce the crash. It occurs perhaps one out of every 10 runs. It can crash (viewed by CrashReporter) in multiple places, mainly in ::parse(), and operator%.
I compile with -O0. If it would help, I can post the logs from CrashReporter.
#include