Skip to content

Conversation

@aitap
Copy link
Member

@aitap aitap commented Dec 19, 2025

Closes #7486

Previously, dogroups() could try to read elements after the (resized) end of over-allocated data.table list, expecting them to be NULL. This didn't crash in practice, but (as of r89198) is explicitly checked for (and disallowed):

  > DT[, grp := .GRP, by=x]                 # add a group counter column
  Error in `[.data.table`(DT, , `:=`(grp, .GRP), by = x) : 
    attempt access index 3/3 in VECTOR_ELT
  Calls: [ -> [.data.table

Previously, dogroups() could try to read elements after the (resized)
end of over-allocated data.table list, expecting them to be NULL. This
didn't crash in practice, but is now explicitly checked for (and
disallowed).
@codecov
Copy link

codecov bot commented Dec 19, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.04%. Comparing base (e35dec5) to head (20154a3).
⚠️ Report is 6 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #7485   +/-   ##
=======================================
  Coverage   99.04%   99.04%           
=======================================
  Files          87       87           
  Lines       16671    16671           
=======================================
  Hits        16511    16511           
  Misses        160      160           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@github-actions
Copy link

github-actions bot commented Dec 19, 2025

  • HEAD=vector_elt_overflow stopped early for DT[,.SD] improved in #4501
    Comparison Plot

Generated via commit 20154a3

Download link for the artifact containing the test results: ↓ atime-results.zip

Task Duration
R setup and installing dependencies 2 minutes and 52 seconds
Installing different package versions 44 seconds
Running and plotting the test cases 5 minutes and 26 seconds

@ben-schwen ben-schwen merged commit be67a4d into master Dec 19, 2025
11 checks passed
@ben-schwen
Copy link
Member

LGTM TY. I also added a NEWS. @TysonStanley this will most definitely need to be picked for resubmit :/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bounds checking in R-devel (r89198) causing issues in data.table

2 participants