Skip to content

Conversation

@aitap
Copy link
Member

@aitap aitap commented Jan 15, 2026

When y has no rows, the data pointers of the columns of unique(y[,...]) are poisoned. Instead of trying to dereference them, pretend that all comparisons fail and fill the return value with NAs.

When there are no matches on the non-range columns, the index in from[i] may become 0. So uncomment the (from[i]>0) ? from[i] : 1 checks instead of trusting from[i] and accessing VECTOR_ELT(lookup, -1). I am especially interested in someone double-checking this part because there are other places where from[i] is not checked for being > 0. Are they reachable with from[i] == 0?

Fixes: #7597

aitap added 4 commits January 15, 2026 14:56
If 'ux' contains 0 rows, pretend that all comparisons against its
non-existent elements fail.
This used to happen when from[i] was 0. (No match on non-range columns?)
@aitap aitap requested a review from MichaelChirico as a code owner January 15, 2026 12:28
@codecov
Copy link

codecov bot commented Jan 15, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.00%. Comparing base (0216983) to head (9688a35).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #7598   +/-   ##
=======================================
  Coverage   99.00%   99.00%           
=======================================
  Files          87       87           
  Lines       16893    16897    +4     
=======================================
+ Hits        16725    16729    +4     
  Misses        168      168           

☔ 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

  • HEAD=fix-7597 slower P<0.001 for memrecycle regression fixed in #5463
    Comparison Plot

Generated via commit 9688a35

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

Task Duration
R setup and installing dependencies 5 minutes and 11 seconds
Installing different package versions 10 minutes and 56 seconds
Running and plotting the test cases 4 minutes and 8 seconds

@aitap aitap added this to the 1.18.2 milestone Jan 15, 2026
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.

foverlaps segfault when y has 0 rows

1 participant