[compiler-rt] 848bc1c - Fix GetRandom in sanitizer_fuchsia.cpp (#110155)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 22 22:44:37 PDT 2024
Author: Marco Vanotti
Date: 2024-10-22T22:44:35-07:00
New Revision: 848bc1c38334db3793d5b3ffbb87b1fd66de34dd
URL: https://github.com/llvm/llvm-project/commit/848bc1c38334db3793d5b3ffbb87b1fd66de34dd
DIFF: https://github.com/llvm/llvm-project/commit/848bc1c38334db3793d5b3ffbb87b1fd66de34dd.diff
LOG: Fix GetRandom in sanitizer_fuchsia.cpp (#110155)
The `zx_cprng_draw` system call has no limit on how much you can draw.
Co-authored-by: Marco Vanotti <mvanotti at users.noreply.github.com>
Added:
Modified:
compiler-rt/lib/sanitizer_common/sanitizer_fuchsia.cpp
Removed:
################################################################################
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_fuchsia.cpp b/compiler-rt/lib/sanitizer_common/sanitizer_fuchsia.cpp
index c2ace46c946587..acbf3ebfc95c0e 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_fuchsia.cpp
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_fuchsia.cpp
@@ -523,7 +523,6 @@ uptr ReadLongProcessName(/*out*/ char *buf, uptr buf_len) {
uptr MainThreadStackBase, MainThreadStackSize;
bool GetRandom(void *buffer, uptr length, bool blocking) {
- CHECK_LE(length, ZX_CPRNG_DRAW_MAX_LEN);
_zx_cprng_draw(buffer, length);
return true;
}
More information about the llvm-commits
mailing list