[MacPorts] #40925: libboost (libstdc++) segfault on 10.9 Mavericks
MacPorts
noreply at macports.org
Thu Oct 24 21:24:57 PDT 2013
#40925: libboost (libstdc++) segfault on 10.9 Mavericks
-----------------------+--------------------------------
Reporter: wjngkoh@… | Owner: macports-tickets@…
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 2.2.99
Keywords: | Port:
-----------------------+--------------------------------
Hi all,
I encountered a segfault error when I used boost::filesystem with gcc-
mp-4.8. Both are installed via MacProts (ports gcc48 and boost.) After
upgrading from Mountain Lion to Mavericks, I experienced this problem, so
I just formatted my laptop and did clean install Mavericks and MacPorts
from SVN again. However, the same problem still persists. Thus, I think it
would be an actual bug rather than my mistake, and hope others can also
reproduce this problem.
Here is the lldb output of my example code:
{{{
% lldb boost_test
!244
Current executable set to 'boost_test' (x86_64).
(lldb) run
Process 7718 launched: '/tmp/boost_test' (x86_64)
Process 7718 stopped
* thread #1: tid = 0x729956, 0x000000010002fe29
libstdc++.6.dylib`__cxxabiv1::__si_class_type_info::__do_dyncast(long,
__cxxabiv1::__class_type_info::__sub_kind, __cxxabiv1::__class_type_info
const*, void const*, __cxxabiv1::__class_type_info const*, void const*,
__cxxabiv1::__class_type_info::__dyncast_result&) const + 35, queue =
'com.apple.main-thread, stop reason = EXC_BAD_ACCESS (code=1, address=0x9)
frame #0: 0x000000010002fe29
libstdc++.6.dylib`__cxxabiv1::__si_class_type_info::__do_dyncast(long,
__cxxabiv1::__class_type_info::__sub_kind, __cxxabiv1::__class_type_info
const*, void const*, __cxxabiv1::__class_type_info const*, void const*,
__cxxabiv1::__class_type_info::__dyncast_result&) const + 35
libstdc++.6.dylib`__cxxabiv1::__si_class_type_info::__do_dyncast(long,
__cxxabiv1::__class_type_info::__sub_kind, __cxxabiv1::__class_type_info
const*, void const*, __cxxabiv1::__class_type_info const*, void const*,
__cxxabiv1::__class_type_info::__dyncast_result&) const + 35:
-> 0x10002fe29: movq 8(%rcx), %rsi
0x10002fe2d: movq %r9, 16(%rsp)
0x10002fe32: movq 96(%rsp), %rbp
0x10002fe37: movq 104(%rsp), %r15
(lldb) list
6 int main() {
7 string src = "boost_test.cpp";
8 string dst = "boost_test.cpp.bak";
9 boost::filesystem::exists(dst);
10 boost::filesystem::remove(dst);
11 boost::filesystem::copy_file(src, dst);
12 }
(lldb)
}}}
The example code I used in this testing is as follows:
{{{
#include <iostream>
#include <string>
#include <boost/filesystem.hpp>
using namespace std;
int main() {
string src = "boost_test.cpp";
string dst = "boost_test.cpp.bak";
boost::filesystem::exists(dst);
boost::filesystem::remove(dst);
boost::filesystem::copy_file(src, dst);
}
}}}
and also Makefile.
{{{
boost_test: boost_test.cpp
g++-mp-4.8 -g -I/opt/local/include -L/opt/local/lib boost_test.cpp
-lboost_filesystem-mt -lboost_system-mt -o boost_test
}}}
--
Ticket URL: <https://trac.macports.org/ticket/40925>
MacPorts <http://www.macports.org/>
Ports system for OS X
More information about the macports-tickets
mailing list