From deepayan.sarkar at gmail.com  Wed May 23 01:43:35 2007
From: deepayan.sarkar at gmail.com (Deepayan Sarkar)
Date: Tue, 22 May 2007 16:43:35 -0700
Subject: [Rd] regexp bug in very recent r-devel
Message-ID: <eb555e660705221643w1919e3c6g471bfeab544d194@mail.gmail.com>

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



[Rd] regexp bug in very recent r-devel
Deepayan Sarkar