Simple Rcpp function crashes Rstudio

The following simple Rcpp function crashes (i.e. bomb screen "R session aborted") Rstudio reliably. Two questions:

  • Why does it happen?
  • What can I do about this?
library(Rcpp)

cppFunction('
  NumericVector EvilFun() {
    return as<NumericVector>(0);
  }
')

EvilFun()

Version Info
RStudio: Version 1.3.1056 ("Water Lily" (5a4dee98, 2020-07-07) for Windows)
OS: Windows 8.1 (Version 6.3 Build 9600)
R: "R version 4.0.1 (2020-06-06)"
Rcpp: 1.0.5

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.