fuzzMap calls in VectorFuzzer yield inconsistent results across platforms #3561
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary:
The order arguments are evaluated in a function call in C++ is not specified.
This leads to issues when we call functions that invoke our RNG in the VectorFuzzer in two arguments, like these fuzzMap calls where we call one such function for the keys and one for the values.
This came up when trying to repro
#3419
In the CircleCI environment the values were generated before the keys when calling fuzzMap, while in my local environment the keys were generated before the values. I was getting different results and unable to reproduce the issue.
Constructing the arguments outside the function call allows us to control the order in which their invoked.
Differential Revision: D42178884