[PATCH] D59279: [Analyzer] Checker for non-determinism caused by iteration of unordered container of pointers
Kristóf Umann via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Mar 22 00:27:42 PDT 2019
Szelethus added a comment.
In D59279#1438514 <https://reviews.llvm.org/D59279#1438514>, @mgrang wrote:
> Although, as you rightly pointed out that //ordered// sets of pointers are as non-deterministic as //unordered// ones.
What if you store pointers to the elements of an array? In that case, it should be deterministic.
-----------
|1|2|3|5|6|
-----------
^ ^
p q
In the above example, pointer `p`'s memory address will always be less then `q`'s, so in an ordered set, iterating over them would be deterministic. When hashing algorithms come into the picture, than it wouldn't be :^)
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D59279/new/
https://reviews.llvm.org/D59279
More information about the cfe-commits
mailing list