[SERVER-63017] Fix SBE translation of variadic expressions for zero argument case Created: 26/Jan/22 Updated: 29/Oct/23 Resolved: 28/Jan/22 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | Backlog |
| Fix Version/s: | 5.3.0 |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Mihai Andrei | Assignee: | Irina Yatsenko (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | greenerbuild | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||||||
| Backport Requested: |
v5.2
|
||||||||||||||||||||
| Participants: | |||||||||||||||||||||
| Linked BF Score: | 185 | ||||||||||||||||||||
| Description |
|
Recently, two bugs were found by the fuzzer ( |
| Comments |
| Comment by Githook User [ 02/Feb/22 ] |
|
Author: {'name': 'Irina Yatsenko', 'email': 'irina.yatsenko@mongodb.com', 'username': 'IrinaYatsenko'}Message: (cherry picked from commit 59e5b09e6840c5d00fbc961f812d66a00f823938) |
| Comment by Mihai Andrei [ 28/Jan/22 ] |
|
Sure; I'll close this one and file a follow up. |
| Comment by Kyle Suarez [ 27/Jan/22 ] |
|
irina.yatsenko and mihai.andrei, from a ticket maintenance standpoint – I would like to close this ticket and give it an appropriate fix version, given that Irina has committed something to master. If there is follow-on work, we can track it separately by filing a follow-up ticket. Does that sound acceptable? |
| Comment by Irina Yatsenko (Inactive) [ 27/Jan/22 ] |
|
Per discussion with mihai.andrei keeping the ticket open to investigate if any more hardening is needed in the SBE expression translators (and/or more test coverage). |
| Comment by Githook User [ 27/Jan/22 ] |
|
Author: {'name': 'Irina Yatsenko', 'email': 'irina.yatsenko@mongodb.com', 'username': 'IrinaYatsenko'}Message: |
| Comment by Irina Yatsenko (Inactive) [ 26/Jan/22 ] |
|
I've looked through publicly documented Aggregation Pipeline Operators (https://docs.mongodb.com/manual/reference/operator/aggregation) for those that have signature of {$op:{ $setEquals: [ <expression1>, <expression2>, ... ] }} and found the following: $and, $or handle no args with default values of true/false respectively. $add, $concat, $concatArrays, $multiply, $setIntersection, $setUnion – fail with the server invariant
Note: the public documentation for $setUnion and $setIntersection says "Takes two or more arrays and returns an array that contains the elements that appear in every input array." but both return an empty set when optimizations are enabled. Similarly, the public documentation for $and/$or requires at least one argument but we actually handle zero. Should the docs be updated? |