Skip to content

Segfault on stop #347

Description

@romainfrancois

This has been reported by @pschmied here initially. tidyverse/dplyr#1318

maui% cat ./test.cpp 
#include <Rcpp.h>
using namespace Rcpp;

// [[Rcpp::export]]
void test(){
  SEXP s = Rf_install("County") ;
  CharacterVector v(1) ; v[0] = PRINTNAME(s) ;
  const char* txt = v[0];
  stop( "unknown column '%s' ", txt ) ;
}


/*** R
  test()
*/
maui% Rscript -e "Rcpp::sourceCpp( '~/tmp/test.cpp') "

> test()
Error: segfault from C stack overflow
Error: C stack usage  121890565849832 is too close to the limit
Execution halted
maui% 

I can't reproduce it locally. Perhaps someone with a system closer to @pschmied. I guess it's an issue with tinyformat.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions