-
Notifications
You must be signed in to change notification settings - Fork 991
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
setattr crashed when given empty character vector as name or value #2386
Comments
No repro on Win 7:
with
|
This managed to crash mine (same for character(0) in the other parameter): R version 3.4.1 (2017-06-30) data.table 1.10.4 |
I guess you should test on the development version before reporting here, per https://github.com/Rdatatable/data.table/wiki/Support |
Trying this with the R-devel version and latest data.table build does not reproduce. But here's the thing, I'm pretty sure this is dependent on what memory the uninitialized data is pointing to. Different builds might do different things. However, the bug I pointed out is still there and it is a simple code flow. |
I can crash with So, the only problem is when using Cheers, |
Trying to run setattr(numeric(1), "class", character(0)) or setattr(numeric(1), character(0), "value") crashes because the setattrib c function doesn't check if the value or name string vector actually has length > 0 before accessing it with STRING_ELT.
The text was updated successfully, but these errors were encountered: