You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
protect fresh proxy get() results in conversion and assignment operators
Proxy operator T() conversions and proxy-to-proxy assignments passed the
raw result of get() into allocating calls (as<T>() coercions, set()
implementations that allocate before capturing the value). When get()
returns a freshly computed SEXP -- an active binding or active RefClass
field, a field access evaluated via $, an attribute expanded by
Rf_getAttrib() -- that object is referenced from nowhere the garbage
collector can see, and a collection triggered inside the window frees it
while still in use. Reproducible via gctorture() on an R built with
structure checking; see #1491 for details and a reproducible example.
Shield the get() result at each such site. Also fix
Binding::operator=(const Binding&), whose self-assignment guard
('*this != rhs') failed to compile whenever the operator was actually
instantiated; the new regression test is its first instantiation.
Fixes#1491.
0 commit comments