[Lldb-commits] [PATCH] D48479: Represent invalid UUIDs as UUIDs with length zero
Pavel Labath via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Mon Jun 25 08:21:27 PDT 2018
labath added a comment.
In https://reviews.llvm.org/D48479#1141274, @clayborg wrote:
> Would love to remove the "accept_zeroes" argument everywhere. Too much matching happens in LLDB and we can't have multiple shared libraries claiming zeros as their UUID
A zero UUID is a problem only if it someone put it there to mean "I don't know". "Real" UUIDs seem to acknowledge the concept of a nil value https://en.wikipedia.org/wiki/Universally_unique_identifier#Nil_UUID, and I guess that's what Mac is following. But we're using this class to represent other things besides the "real" UUIDs, and for those a zero value is as valid as any other number (it's extremely unlikely that a 20-byte hash will come out all-zero, but that isn't so much the case for a 32-bit CRC). I think the best we can do here is make the choice between the two treatments as explicit as possible. I hope the explicitly named constructor functions will be enough to achieve that.
More information about the lldb-commits