I spent two hours trying to debug an issue in a package, but I think the issue is with R.
I want to know if others can reproduce the crash and if it's worth reporting?
Here's a minimal example to reproduce the crash:
# a bunch of icelandic words
i500_utf8 <- readLines("https://pastebin.com/raw/MFCQfhpY", encoding = "UTF-8")
i500_latin1 <- iconv(i500_utf8, "UTF-8", "latin1")
gctorture(TRUE)
print("utf8")
i500_utf8_shuffled <- c(NA_character_, i500_utf8[sample(length(i500_utf8))][-1])
temp <- c(i500_utf8, NA_character_)
y <- match(temp, i500_utf8_shuffled)
print("latin1")
i500_latin1_shuffled <- c(NA_character_, i500_latin1[sample(length(i500_latin1))][-1])
temp <- c(i500_latin1, NA_character_)
y <- match(temp, i500_latin1_shuffled)
(You might have to paste it in a few times)
I've managed to reproducibly crash R on several different systems:
- Ubuntu WSL R 4.1.0 -- crash "memory not mapped"
- Ubuntu VM R 4.1.1 (fresh install) -- crash "memory not mapped"
- Centos R 4.1.0 -- crash memory not mapped
- Windows R 4.1.1 -- crash no message
- Mac R 4.0.5 -- No crash
- Mac R 4.1.1 -- crash "recursive gc invocation"
I want to know if others can reproduce the crash and if it's worth reporting?