-
Notifications
You must be signed in to change notification settings - Fork 993
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
Fix segfaults when assigning to list column #4350
Fix segfaults when assigning to list column #4350
Conversation
Codecov Report
@@ Coverage Diff @@
## master #4350 +/- ##
=======================================
Coverage 99.47% 99.47%
=======================================
Files 75 75
Lines 14775 14785 +10
=======================================
+ Hits 14697 14707 +10
Misses 78 78
Continue to review full report at Codecov.
|
Uh, if I understand the Codecov report correctly, I need to add unit tests for raw and complex rhs and one that doesn't fit any of these types? |
Thanks for PR. Yes, every new line of C has to be reached for code coverage to be happy. We can always workout code coverage later on. Much more important to pass the CI checks. |
Cool, thanks for the explanation. And I will try not to fat finger the close button again. |
Yes, you understand correct. If you would push to Rdatatable org branch, it would be much easier for others to add those tests for you. If you cannot yet push branches to our org then @mattdowle should be able to invite you to members. |
I'm not a member so can't push to this repo. Also, sorry for the delay. My time is a bit more limited than usual atm. I've now added the missing unit tests and found and fixed a bug in the process. I'm sure there's a lesson in there somewhere. |
Closes #4166
Closes #4667
Closes #4678
Closes #4729
The issue there was unrelated to the unlisting. A minimal example that also segfaults is
Turns out when LHS is a list column and RHS isn't, no length checks were being made. I am slightly surprised by @MichaelChirico's result which was maybe even intended.
While testing my fix I noticed that subassigning a vector of correct length also segfaults:
I see three possible ways of handling this:
I opted for 3. because why not. It seems the most intuitive to me besides 1. But happy to change this if people disagree. Required 'some' abuse of the BODY macro in memrecycle...