Repository navigation
Conversation
Compare the complete underlying sets so a matching prefix is not considered equal and comparison cannot overrun a shorter right-hand set. Add exhaustive signed and unsigned identifier-set regression tests, run in release and checked-iterator builds in CI.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
Walkthrough
ChangesIdentifier Set Equality
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix Merge Risk: ⚪ Minimal · up to
|
Identifiers::operator==uses the three-iterator overload ofstd::equal. It treats a matching left-hand prefix as equal, so an empty set compares equal to any set. If the left-hand range is longer, the comparison can overrun the right-hand range; the checked-iterator build detects this invalid access. This operator is used by the pickup-and-delivery initial-solution invariant comparing all orders against assigned and unassigned orders.This uses the underlying sets' equality operator, which checks both size and contents.
The new standalone C++17 test checks every pair of subsets for signed and unsigned identifiers, plus extreme values. Expected results come from the subset masks. The CI job runs the test in optimized and checked-iterator builds without needing a database.
Validation:
I haven't built the full extension or run the database-backed pgTAP suite.
Summary by CodeRabbit
Bug Fixes
Tests