boost.asio Bus error on g++ 4.5 / Mac OS X 10.5.6

Hi! For some reason very simple program crashes with Bus error. code is --------------------------- #include <iostream> #include <boost/asio.hpp> int main(int argc, char **argv) { std::cout << "xxx" << std::endl; return 0; } --------------------------- Crash happens before any output is made. I'm using boost.build to build executables. The bug dissapears when building variant=debug. Gdb output: --------------------------- Program received signal EXC_BAD_ACCESS, Could not access memory. Reason: KERN_PROTECTION_FAILURE at address: 0x00000000 0x000019a8 in ?? () (gdb) bt #0 0x000019a8 in ?? () #1 0x00001e90 in boost::asio::detail::service_id<boost::asio::detail::reactive_descriptor_service<boost::asio::detail::kqueue_reactor<false>
::~service_id () Previous frame inner to this frame (gdb could not unwind past this frame)
Situation is that I'm building with g++4.5 installed from macports, with --std=c++0x, but boost itself was built with regular gcc 4.0.1. 4.5 version located at /opt/local/* , boost located at /usr/local/*. How could it happen that asio library destroys something even before my code is reached? No library initialization involved. Thanks in advance!
participants (1)
-
Orca X