[Rd] regexp bug in very recent r-devel
Deepayan Sarkar
deepayan.sarkar at gmail.com
Wed May 23 01:43:35 CEST 2007
completion is semi-broken in today's r-devel, and the reason seems to
be some regular expression changes:
> sessionInfo()
R version 2.6.0 Under development (unstable) (2007-05-22 r41673)
i686-pc-linux-gnu
locale:
[...]
attached base packages:
[1] "stats" "graphics" "grDevices" "utils" "datasets" "methods"
[7] "base"
> regexpr("o", "foo", fixed = TRUE)
[1] 2
attr(,"match.length")
[1] 1
> gregexpr("o", "foo", fixed = FALSE)
[[1]]
[1] 2 3
attr(,"match.length")
[1] 1 1
> gregexpr("o", "foo", fixed = TRUE)
*** caught segfault ***
address 0xc022fdab, cause 'memory not mapped'
Traceback:
1: gregexpr("o", "foo", fixed = TRUE)
Possible actions:
1: abort (with core dump, if enabled)
2: normal R exit
3: exit R without saving workspace
4: exit R saving workspace
On a different machine, this freezes R for a long time, consuming CPU
cycles and a lot of memory, before returning an error:
> gregexpr("o", "foobar", fixed = TRUE)
Error in gregexpr("o", "foobar", fixed = TRUE) :
negative length vectors are not allowed
> sessionInfo()
R version 2.6.0 Under development (unstable) (2007-05-22 r41675)
x86_64-unknown-linux-gnu
-Deepayan
More information about the R-devel
mailing list