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)
Tue, Dec 9, 12:18 AM
Unknown Object (File)
Thu, Dec 4, 8:53 PM
Unknown Object (File)
Mon, Nov 24, 10:46 PM
Unknown Object (File)
Fri, Nov 21, 3:59 AM
Unknown Object (File)
Mon, Nov 17, 10:10 PM
Unknown Object (File)
Sun, Nov 16, 1:53 PM
Unknown Object (File)
Oct 27 2025, 4:15 AM
Unknown Object (File)
Oct 15 2025, 4:43 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

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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.