Another UB triggered in https://github.com/RcppCore/Rcpp/blob/e5b03df9db2e46aeff3a6310ee4ebcddc2a69698/inst/tinytest/cpp/ListOf.cpp#L108-L110 The issue is in the definition https://github.com/RcppCore/Rcpp/blob/e5b03df9db2e46aeff3a6310ee4ebcddc2a69698/inst/include/Rcpp/vector/ListOf.h#L25-L30 Since `ListOf<T>` is a wrapper, it should inherit from `NamesProxyPolicy<ListOf<T>>` instead, etc. Otherwise, this cast produces the UB: https://github.com/RcppCore/Rcpp/blob/e5b03df9db2e46aeff3a6310ee4ebcddc2a69698/inst/include/Rcpp/proxy/NamesProxy.h#L82-L84 But then we need to avoid using methods that are not part of `ListOf<T>`, such as `get__()` and `set__()` (or define them). PR coming.
Activity