[PATCH] D34412: [sanitizer] Add a function to gather random bytes
Kostya Kortchinsky via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 20 12:09:15 PDT 2017
cryptoad added a comment.
In https://reviews.llvm.org/D34412#785712, @zturner wrote:
> Assuming sanitizer windows doesn't mind to take a dependency on `advapi32.dll` (maybe it already has one?) this can be implemented pretty trivially using `CryptGenRandom` or `RtlGenRandom` (latter is easier to use).
Looks like this is what is needed indeed. I can speak for what's going on with Sanitizer Windows though.
> In any case, shouldn't the unimplemented versions at least do *something*, even if they are not cryptographically strong?
I am not in disagreement. The reasoning behind leaving them unimplemented is twofold:
- without a dev platform (and experience on the platform) for either, I am not comfortable writing something and debugging through the bots;
- it might lead to false expectation as to what the function is doing.
If that can be done in parts, this one first, then the other platforms by people with experience, that help solve this.
Or if you have an idea that can work for a simple initialization that is bound to work, I'll gladly take it.
https://reviews.llvm.org/D34412
More information about the llvm-commits
mailing list