[Rd] regexp bug in very recent r-devel

From: Deepayan Sarkar <deepayan.sarkar_at_gmail.com>
Date: Tue, 22 May 2007 16:43:35 -0700


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)

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



R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Tue 22 May 2007 - 23:46:55 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 23 May 2007 - 10:33:30 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.