search for: is_growable

Displaying 3 results from an estimated 3 matches for "is_growable".

2024 Apr 05
1
Bug in out-of-bounds assignment of list object to expression() vector
...main/subassign.c, do_subassign2_dflt(). 2. do_subassign2_dflt() calls SubassignTypeFix() to prepare the operand for the assignment. 3. Since the assignment is "stretching", SubassignTypeFix() calls EnlargeVector() to provide the space for the assignment. The bug relies on `x` not being IS_GROWABLE(), which may explain why a plain x[[4]] <- list() sometimes doesn't fail. The future assignment result `x` is now expression(a, b, c, NULL), and the old `x` set to expression(NULL, NULL, NULL) by SET_VECTOR_ELT(newx, i, VECTOR_ELT(x, i)); CLEAR_VECTOR_ELT(x, i); during EnlargeVector(). 4....
2024 Apr 05
1
[External] Re: Bug in out-of-bounds assignment of list object to expression() vector
...). > > 2. do_subassign2_dflt() calls SubassignTypeFix() to prepare the operand > for the assignment. > > 3. Since the assignment is "stretching", SubassignTypeFix() calls > EnlargeVector() to provide the space for the assignment. > > The bug relies on `x` not being IS_GROWABLE(), which may explain > why a plain x[[4]] <- list() sometimes doesn't fail. > > The future assignment result `x` is now expression(a, b, c, NULL), and > the old `x` set to expression(NULL, NULL, NULL) by SET_VECTOR_ELT(newx, > i, VECTOR_ELT(x, i)); CLEAR_VECTOR_ELT(x, i); duri...
2024 Apr 05
3
Bug in out-of-bounds assignment of list object to expression() vector
There seems to be a bug in out-of-bounds assignment of list objects to an expression() vector. Tested on release and devel. (Many thanks to folks over at Mastodon for the help narrowing down this bug) When assigning a list into an existing index, it correctly errors on incompatible type, and the expression vector is unchanged: ``` x <- expression(a,b,c) x[[3]] <- list() # Error x #>