[PATCH v1] ppc64le: Power 10 rawmemchr clobbers v20 (bug #33091)
Cristian Rodríguez
cristian@rodriguez.im
Wed Oct 22 16:31:33 GMT 2025
On Tue, Oct 21, 2025 at 4:40 AM Sachin Monga <smonga@linux.ibm.com> wrote:
>
>
> On 17/10/25 7:48 pm, Cristian Rodríguez wrote:
> Let me know if you want me to share the results here.
Yes, it is applications that need to be changed to just call memchr
instead and avoid this non-standard interface that may cause UB..this
interface needs a [[deprecated]] so
developers are aware of this..
rawmemchr(s, '\0');
to
memchr(s, 0, ..)
which the compiler will expand to s + strlen(s) (if s is known at
compile time it will be optimized out completely..)
More information about the Libc-alpha
mailing list