[compiler-rt] Fix GetRandom in sanitizer_fuchsia.cpp (PR #110155)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 26 11:31:50 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-compiler-rt-sanitizer
Author: Marco Vanotti (mvanotti)
<details>
<summary>Changes</summary>
The `zx_cprng_draw` system call has no limit on how much you can draw.
---
Full diff: https://github.com/llvm/llvm-project/pull/110155.diff
1 Files Affected:
- (modified) compiler-rt/lib/sanitizer_common/sanitizer_fuchsia.cpp (-1)
``````````diff
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_fuchsia.cpp b/compiler-rt/lib/sanitizer_common/sanitizer_fuchsia.cpp
index 75dcf546729f6e..e8741585059123 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_fuchsia.cpp
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_fuchsia.cpp
@@ -518,7 +518,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;
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/110155
More information about the llvm-commits
mailing list