7 ms·
I know you asked for strcmp, but the strlen is far better documented on how the null-byte detection works for ARM. https://lkml.org/lkml/2020/9/14/871 https://
by zeusk 6y ago
I know you asked for strcmp, but the strlen is far better documented on how the null-byte detection works for ARM.
https://lkml.org/lkml/2020/9/14/871 https://lkml.org/lkml/2020/9/14/871
https://github.com/ARM-software/optimized-routines/blob/master/string/aarch64/strlen-mte.S https://github.com/ARM-software/optimized-routines/blob/mast...
- sgtnoodle 6y agoI see, so the implementations basically read past the end of the string as long as it won't cross a page boundary and cause a memory protection fault. It's technically a buffer overflow, but since the implementations are architecture specific, it's safe to do. I wonder if there are memory sanitizers that would complain about that sort of access?
- deleted 6y ago[deleted]