[PATCH] D142388: [clang] Add builtin_nondeterministic_value

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 12 09:57:25 PDT 2023


aaron.ballman added a comment.

In D142388#4412521 <https://reviews.llvm.org/D142388#4412521>, @rsmith wrote:

> I have a concern with the name of this builtin. People are going to assume it produces a nondeterministic value, and use it for seeding random number generators and similar, and will be surprised when the value produced is actually deterministic, and, worse, might leak information on the stack that was left behind by some previous function call. Can we give this a name that doesn't suggest that it produces its value nondeterministically?

That's a fair point; do you have a suggestion for a name? (I had suggested `__builtin_unspecified_value()` but perhaps that is too focused on the term of art.)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D142388/new/

https://reviews.llvm.org/D142388



More information about the cfe-commits mailing list