The _zx_cprng_draw API expects to be looped rather than simply
called. Update the code to reflect this.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
LGTM
compiler-rt/lib/sanitizer_common/sanitizer_fuchsia.cc | ||
---|---|---|
494 ↗ | (On Diff #118465) | Pointer arithmetic on void* is a GNU extension, but fine if it's allowed in this code. |
compiler-rt/lib/sanitizer_common/sanitizer_fuchsia.cc | ||
---|---|---|
490 ↗ | (On Diff #118465) | length being a uptr, the condition comes down to while length != 0. I assume size is guaranteed to not be > length? |
compiler-rt/lib/sanitizer_common/sanitizer_fuchsia.cc | ||
---|---|---|
490 ↗ | (On Diff #118465) | that's correct; size will never be > length |
494 ↗ | (On Diff #118465) | interesting! how would i know whether a particular extension is allowed in a part of compiler-rt? i couldn't find anything about it in the LLVM coding standards |
compiler-rt/lib/sanitizer_common/sanitizer_fuchsia.cc | ||
---|---|---|
494 ↗ | (On Diff #118465) | If it compiles then they haven't chosen -std=... options to enforce it, which means either they think it's fine or they don't really care. |
compiler-rt/lib/sanitizer_common/sanitizer_fuchsia.cc | ||
---|---|---|
494 ↗ | (On Diff #118465) | sgtm |
added a couple reviewers with commit bits
please feel free to hit the "ship it" button on my behalf or, if that should not happen, let me know what to fix!
compiler-rt/lib/sanitizer_common/sanitizer_fuchsia.cc | ||
---|---|---|
494 ↗ | (On Diff #118465) | Make sure you try to compile this code with Clang as your host compiler. |
compiler-rt/lib/sanitizer_common/sanitizer_fuchsia.cc | ||
---|---|---|
494 ↗ | (On Diff #118465) | I tried build our toolchain with this patch (which uses Clang as a first stage compiler) and I'm getting an error on this line: error: arithmetic on a pointer to void |