Hi,

We are using boost libraries(version 1.56.0) in our application(32bit application). Our application crashes only Mac OS(10.8) platform with Bus Error 10.


$gdb ./ourapp core.xxx
GNU gdb 6.3.50-20050815 (Apple version gdb-1705) (Fri Jul  1 10:50:06 UTC 2011)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "x86_64-apple-darwin"...Reading symbols for shared li                 braries ........ done

Core was generated by `./ourapp'.
Reading symbols for shared libraries . done
Reading symbols for shared libraries ...........................................                                                                              ................................................................................                                                                              ............ done

#0  0x98218aa2 in __semwait_signal ()
(gdb) bt
#0  0x98218aa2 in __semwait_signal ()
#1  0x9821875e in _pthread_cond_wait ()
#2  0x9821a3f8 in pthread_cond_wait$UNIX2003 ()
#3  0x0000f1f1 in std::_Rb_tree<std::string, std::string, std::_Identity<std::string>, std::less<std::string>, std::allocator<std::string> >::_M_erase ()
#4  0x0000b6f4 in ?? ()
#5  0x000025a1 in ?? ()
#6  0x0000af63 in ?? ()
#7  0x00002035 in ?? ()
(gdb) t 2
(gdb) bt
#0  0x98218aa2 in __semwait_signal ()
#1  0x9821875e in _pthread_cond_wait ()
#2  0x9821a3f8 in pthread_cond_wait$UNIX2003 ()
#3  0x0000f1f1 in std::_Rb_tree<std::string, std::string, std::_Identity<std::string>, std::less<std::string>, std::allocator<std::string> >::_M_erase ()
#4  0x0000b6f4 in ?? ()
#5  0x00016206 in boost::exception_detail::set_info<boost::exception_detail::clone_impl<boost::exception_detail::bad_alloc_> > ()
#6  0x0001ce4e in std::vector<std::string, std::allocator<std::string> >::_M_insert_aux ()
#7  0x0001cdb9 in std::vector<std::string, std::allocator<std::string> >::_M_insert_aux ()
#8  0x0001cd1c in std::vector<std::string, std::allocator<std::string> >::_M_insert_aux ()
#9  0x0001caaf in std::vector<std::string, std::allocator<std::string> >::_M_insert_aux ()
#10 0x001dba1b in boost::this_thread::get_id ()
#11 0x001db13c in boost::this_thread::get_id ()
#12 0x0087866e in icu_44::ServiceListener::~ServiceListener ()
#13 0x98218259 in _pthread_start ()
#14 0x982180de in thread_start ()

Can anybody explain the root cause of the problem? This crash happens only on Mac OS.
While building boost libraries on Mac OS, do we need to set any extra flags?

NOTE: Our application runs successfully on other platforms without any problem.

Regards,
Vinay