Skip to content

compilation with clang11 causes fsort to crash #4786

@jangorecki

Description

@jangorecki

Image used below compiles R-devel with gcc but uses clang11 for compiling packages.
Minimal example:

docker run -it registry.gitlab.com/jangorecki/dockerfiles/r-devel-clang Rscript -e 'install.packages("data.table"); readLines(system.file("cc", package="data.table")); library(data.table); example(fsort)'

gdb info (do not just copy paste at once)

docker run -it --cap-add=SYS_PTRACE --security-opt seccomp=unconfined registry.gitlab.com/jangorecki/dockerfiles/r-devel-clang /bin/bash
apt-get update -qq && apt-get -y install gdb
vim ~/.R/Makevars
# change default optimization to -O0
Rscript -e 'install.packages("data.table"); readLines(system.file("cc", package="data.table"))'
R -d gdb
run
library(data.table)
x = runif(1e6)
ans2 = fsort(x)
 Thread 17 "R" received signal SIGSEGV, Segmentation fault.
 [Switching to Thread 0x7fffaaffaf00 (LWP 871)]
 0x00007ffff45b796a in dradix_r (in=0x7ffff37349d8, working=0x7fffa4000c10, 
     n=248, fromBit=33, toBit=40, counts=0x7fffa4000c40) at fsort.c:62
 62      fsort.c: No such file or directory.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions