Closed
Description
When Rcpp code is built with -D_GLIBCXX_USE_CXX11_ABI=0
flag, any throw
or stop
will cause memory-not-mapped crash with std::bad_alloc
.
A minimal reproducible example:
Sys.setenv(PKG_CPPFLAGS = "-D_GLIBCXX_USE_CXX11_ABI=0")
f <- Rcpp::cppFunction('
void test() {
stop("error");
}')
f()
*** caught segfault ***
address 0x7b64060, cause 'memory not mapped'
Traceback:
1: .Call(<pointer: 0x7fd9b3810da0>)
2: f()
Some third-party libs are built with C++11 ABI disabled. This problem makes it hard to use these libs with Rcpp.
Metadata
Metadata
Assignees
Labels
No labels