test function produces a C++ segfault. Calls function baz
which allocates a wrong pointer. If you compiled this
code with CXXFLAGS=-g3 -rdynamic
the installed
function handler
will print a traceback of the
stack that contains the name of the offending function.
Without this compiler flag, you miss the function name.
you should place a call to signal(SIGSEGV,
handler);
at the beginning of each function you want to
check for segfaults.
1 | boom()
|
R will crash with a segfault but you will see a traceback. ONLY run in console.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.