Page MenuHomeFreeBSD

libc: Use musl's optimized memchr
ClosedPublic

Authored by emaste on Oct 20 2018, 10:29 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Oct 12, 3:02 PM
Unknown Object (File)
Sat, Oct 12, 2:47 PM
Unknown Object (File)
Thu, Oct 3, 3:26 AM
Unknown Object (File)
Wed, Oct 2, 11:15 PM
Unknown Object (File)
Wed, Oct 2, 10:22 PM
Unknown Object (File)
Mon, Sep 30, 9:29 AM
Unknown Object (File)
Mon, Sep 30, 2:10 AM
Unknown Object (File)
Sep 25 2024, 12:30 AM
Subscribers

Details

Summary

Parentheses added to HASZERO macro to avoid a GCC warning.

Obtained from: musl (snapshot at commit c648cefb)
Sponsored by: The FreeBSD Foundation

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

This revision is now accepted and ready to land.Oct 21 2018, 12:08 AM

Update with musl 4d0a82170a25464c39522d7190b9fe302045ddb2:

fix aliasing-based undefined behavior in string functions

use the GNU C may_alias attribute if available, and fallback to naive
byte-by-byte loops if __GNUC__ is not defined.

this patch has been written to minimize changes so that history
remains reviewable; it does not attempt to bring the affected code
into a more consistent or elegant form.

FreeBSD is presumably built only with GCC or Clang (which also defines __GNUC__) so this should have no effect but is preferable.

This revision now requires review to proceed.Nov 12 2018, 2:11 PM

This might have gotten newer updates, but otherwise fine with me.

This revision is now accepted and ready to land.Sep 2 2019, 1:34 PM
This revision was automatically updated to reflect the committed changes.