Skip to content

(inappropriate) manipulation of expression objects causes segfault (PR#7326)

2 messages · Deepayan Sarkar, Peter Dalgaard

#
_
platform i686-pc-linux-gnu
arch     i686
os       linux-gnu
system   i686, linux-gnu
status   Under development (unstable)
major    2
minor    1.0
year     2004
month    10
day      25
language R
expression(beta)
Segmentation fault

(Same behaviour in R 1.9.1)

'foo[[2]] <- NA' works fine, though.

Deepayan
#
deepayan@stat.wisc.edu writes:
Right. The NA is not important; foo[2] <- 1 crashes R just as
effectively. We should likely either give an error or demote [ to [[.
The latter is what happens with lists, and expressions are basically
just list of call objects (or names or constants). To wit:
[[1]]
[1] 1

[[2]]
[1] 1

[[3]]
[1] 3