diff options
author | Abseil Team <absl-team@google.com> | 2021-06-02 13:32:24 -0700 |
---|---|---|
committer | Derek Mauro <dmauro@google.com> | 2021-06-02 17:19:50 -0400 |
commit | ed53ad03abd7baf39dda2ac8037ff3d4f5c533e5 (patch) | |
tree | 01d0d16bc184dd01d9009516e8b3eeb60e5ef5a1 /absl/random | |
parent | 702cae1e762dc6f2f9d31777db04e1adbdb36697 (diff) |
Export of internal Abseil changes
--
b2a781121ff72fb485b7e67539d5e4ff1eb66df2 by Gennadiy Rozental <rogeeff@google.com>:
Consistently use absl::flat_hash_map instead of std::map in Flags implementation.
PiperOrigin-RevId: 377132816
--
9ab83a154d8f22d51fed0092bf94245b5af1f498 by Derek Mauro <dmauro@google.com>:
Workaround for MSAN being unable to see through getentropy().
https://github.com/google/sanitizers/issues/1173
PiperOrigin-RevId: 377097059
--
8d28e921442d1b246c26f3200f21027557c47657 by Greg Falcon <gfalcon@google.com>:
Disable stack_consumption_test in tsan builds.
A recent tsan change broke the way this test-only utility was counting stack usage.
PiperOrigin-RevId: 377053169
GitOrigin-RevId: b2a781121ff72fb485b7e67539d5e4ff1eb66df2
Change-Id: Ib56356f8128f6c083f32b950091f3a56d9e2cd51
Diffstat (limited to 'absl/random')
-rw-r--r-- | absl/random/internal/BUILD.bazel | 1 | ||||
-rw-r--r-- | absl/random/internal/seed_material.cc | 4 |
2 files changed, 5 insertions, 0 deletions
diff --git a/absl/random/internal/BUILD.bazel b/absl/random/internal/BUILD.bazel index 90efe85a..6e06fe9a 100644 --- a/absl/random/internal/BUILD.bazel +++ b/absl/random/internal/BUILD.bazel @@ -82,6 +82,7 @@ cc_library( deps = [ ":fast_uniform_bits", "//absl/base:core_headers", + "//absl/base:dynamic_annotations", "//absl/base:raw_logging_internal", "//absl/strings", "//absl/types:optional", diff --git a/absl/random/internal/seed_material.cc b/absl/random/internal/seed_material.cc index 0fcba509..7c1d9efa 100644 --- a/absl/random/internal/seed_material.cc +++ b/absl/random/internal/seed_material.cc @@ -28,6 +28,7 @@ #include <cstdlib> #include <cstring> +#include "absl/base/dynamic_annotations.h" #include "absl/base/internal/raw_logging.h" #include "absl/strings/ascii.h" #include "absl/strings/escaping.h" @@ -142,6 +143,9 @@ bool ReadSeedMaterialFromGetEntropy(absl::Span<uint32_t> values) { if (result < 0) { return false; } + // https://github.com/google/sanitizers/issues/1173 + // MemorySanitizer can't see through getentropy(). + ABSL_ANNOTATE_MEMORY_IS_INITIALIZED(buffer, to_read); buffer += to_read; buffer_size -= to_read; } |