Hi
This is a weird issue, and I'm by no means sure that my description is
correct. It might be a newbie misunderstanding, but it is weird
behaviour and I would appreciate any help in getting to the bottom of
it.
Here is a minimal example that exhibits the issue: ("zeromain.cpp")
#include
#include
int main (int argc, char * argv[])
{
boost::numeric::ublas::coordinate_matrix<double> cm;
cm.resize(3,3, false);
return 0;
}
When compiled [with bjam release] and linked to libboost_thread it
gives a "bus error". The backtrace is appended to this email. It
works fine in debug mode.
You can see that I have introduced boost.thread but not yet actually
used the thread library in any way. If I take out either the include,
or don't link to the lib, the bug goes away.
Thanks in advance for any help or suggestions! Details below.
David
Mac OS X 1.5.5, boost 1.36. Intel CPU.
The boost libraries are in $DYLD_LIBRARY_PATH.
Jamroot contains
exe zm
: zeromain.cpp /sage//boost_thread
: <include>boost
;
("sage" is a separate project whose Jamroot contains
lib boost_thread : : <file>local/lib/boost/libboost_thread-xgcc40-
mt-1_36.a ;
It is a regular build of the boost libraries.)
Backtrace:
Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_PROTECTION_FAILURE at address: 0x00000000
0x00001f24 in boost::numeric::ublas::coordinate_matrix, 0ul,
boost::numeric::ublas::unbounded_array,
boost::numeric::ublas::unbounded_array
::coordinate_matrix ()
(gdb) bt
#0 0x00001f24 in boost::numeric::ublas::coordinate_matrix, 0ul,
boost::numeric::ublas::unbounded_array,
boost::numeric::ublas::unbounded_array