[PATCH] D50127: [Support] use larger character set for creating unique filenames

Bob Haarman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 2 10:37:50 PDT 2018


inglorion added a comment.

In https://reviews.llvm.org/D50127#1185981, @thakis wrote:

> https://bugs.chromium.org/p/chromium/issues/detail?id=856635#c10 sounds like we only saw this if the pattern was made smaller. Are we sure this change fixes an actual problem?


The failure in that bug does not reproduce on my local machine, but when I make the pattern smaller, I end up with a failure that looks a lot like it. For reference, with the old 16-character set and models of length 6, we have a 50%+ chance of collision after 5000 tempfiles or so. We easily generate that many in a ThinLTO build of Chromium. So it seems at least plausible that this is the same problem.

Aside from that, I think this is just a good thing to do.  We're effectively increasing the probability that a name supposed to be unique is indeed unique, without making file names longer or consuming more entropy from the random number generator.


https://reviews.llvm.org/D50127





More information about the llvm-commits mailing list