Bus error side effect from boost::logging

I'm tracking down an intermittent bus error under Mac OS X 10.5.6 that happens when formatting a double as a string. The crash can happen when outputting to a stream, when calling printf, or when using boost::format. Of course the crash only happens in our release build, which always makes things more fun ;-) Here's a sample routine that can trigger the bus error in our unit test: --snip-- int TestDoubleFormatBusError(void) { std::cout << "\nTesting double format problem..." << std::endl; uint64_t testMicroseconds = 100000; double delta = 179; double percentOff; percentOff = (delta / testMicroseconds) * 100; std::cout << percentOff; // <-- This is where the crash sometimes happens. return 0; } --snip-- I'm pretty sure that there's nothing wrong with the above code, but I'm open to suggestions. After binary chopping, I determined that the crash only happens after invoking John Torjo's experimental boost::logging. If I disable logging, the problem goes away. Has anyone seen this problem? John, do you have any suggestions for understanding and resolving the crash? Thanks in advance. Best, -- Allen Cronce
participants (1)
-
Allen Cronce