Skip to content

Segfault with stop on gcc-8.3 on MacOS #961

Description

@jackwasey
R -e 'Rcpp::cppFunction("void f() { Rcpp::stop(\"here\");}"); f()'

gives a segfault, both on my local setup (below) and travis, e.g., https://travis-ci.org/jackwasey/icd/jobs/516438592

gcc-8 --version
gcc-8 (Homebrew GCC 8.3.0) 8.3.0
R version 3.5.2 (2018-12-20) -- "Eggshell Igloo"
Copyright (C) 2018 The R Foundation for Statistical Computing
Platform: x86_64-apple-darwin15.6.0 (64-bit)

~/.R/Makevars of course has CXX=g++-8 and CC=gcc-8

MacOS 10.14.3 and FWIW xcode 10.2

You know how fun the macos toolchain is: I can't get a stack trace with debug symbols, but it seems to be in the Rcpp generated code for the function in question, hence minimal example. LLDB gives me assembly no matter what I do, and that is above my pay grade; I can't make GDB from brew work, due to code signing stuff. My package 'icd' wants openmp, which I suspected, but the above segfault happens without -fopenmp anywhere. Doesn't seem to be related to #347 or #736, but what do I know?

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