Subject: [Boost-bugs] [Boost C++ Libraries] #2470: Problem with threads started in a dynamically loaded bundle under Mac OS X
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2008-11-03 17:19:26
#2470: Problem with threads started in a dynamically loaded bundle under Mac OS X
-----------------------------------------------------+----------------------
Reporter: Daniel Fenner <dfenner_at_[hidden]> | Owner: anthonyw
Type: Bugs | Status: new
Milestone: Boost 1.38.0 | Component: thread
Version: Boost 1.36.0 | Severity: Problem
Keywords: mac bundle thread |
-----------------------------------------------------+----------------------
The attached program (main.cpp) loads a bundle and calls the function
exported herein. The code in the bundle (bundle.cpp) simply starts a
thread, joins it and exits. Then the bundle is unloaded. After a few
hundred of these cycles program crashes.
To compile and create the bundle one might use the following command
lines:
{{{
g++ -x c++ -arch i386 -IPATH/TO/BOOST/HEADER -c bundle.cpp -o bundle.o
mkdir -p bundle.plugin/Contents/MacOS
g++ -o bundle.plugin/Contents/MacOS/bundle -LPATH/TO/BOOST/LIB
-lboost_thread-xgcc40-mt-1_37 -arch i386 -bundle bundle.o
}}}
and for the loader:
{{{
g++ -x c++ -arch i386 -I/Developer/Headers/FlatCarbon/ -c main.cpp -o
main.o
g++ -o main -framework CoreFoundation -arch i386 main.o
}}}
I reproduced this behavior with macosx 10.4 / 10.5 and boost
1.35/1.36/1.37/current trunk. My gcc version is 4.0.1.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/2470> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:49:59 UTC