diff options
author | Michael Jones <michaelrj@google.com> | 2022-07-14 15:17:18 -0700 |
---|---|---|
committer | Michael Jones <michaelrj@google.com> | 2022-11-30 16:48:35 -0800 |
commit | a3b745818d2e13b2899260239c7cab4bf75070f7 (patch) | |
tree | da000bba92c4a4ffc7553d5fd871dc26a8912415 /llvm/lib/CodeGen/StackProtector.cpp | |
parent | 6c2140943cbe257c85f7121349c5bca950a26e0d (diff) | |
download | llvm-a3b745818d2e13b2899260239c7cab4bf75070f7.zip llvm-a3b745818d2e13b2899260239c7cab4bf75070f7.tar.gz llvm-a3b745818d2e13b2899260239c7cab4bf75070f7.tar.bz2 |
[libc] add unsafe mode to strlen
The only safe way to implement strlen involves reading the string one
char at a time. It is faster to read in larger blocks, but this leads to
reading beyond the string boundary, which is undefined behavior. This
patch adds an implementation and flag to use this fast but unsafe
version of strlen.
Reviewed By: sivachandra
Differential Revision: https://reviews.llvm.org/D129808
Diffstat (limited to 'llvm/lib/CodeGen/StackProtector.cpp')
0 files changed, 0 insertions, 0 deletions