| #
e0eaabb8
|
| 20-Nov-2024 |
Ed Maste <emaste@FreeBSD.org> |
libc: Have memcmp test what the standard requires
libc's C memcmp currently returns the difference in byte values rather than just -1/0/1 as the AArch64 assembly implementation, many non- FreeBSD im
libc: Have memcmp test what the standard requires
libc's C memcmp currently returns the difference in byte values rather than just -1/0/1 as the AArch64 assembly implementation, many non- FreeBSD implementations, and compiler built-in optimizations do.
It is a bug for a user to expect memcmp to return the difference in the byte values as the compiler is free to inline memcmp() with an implementation that does not do this. Change the test to validate only what the standard requires.
PR: 289084 Reviewed by: markj, fuz Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D52502
show more ...
|
| #
559a218c
|
| 01-Nov-2023 |
Warner Losh <imp@FreeBSD.org> |
libc: Purge unneeded cdefs.h
These sys/cdefs.h are not needed. Purge them. They are mostly left-over from the $FreeBSD$ removal. A few in libc are still required for macros that cdefs.h defines. Kee
libc: Purge unneeded cdefs.h
These sys/cdefs.h are not needed. Purge them. They are mostly left-over from the $FreeBSD$ removal. A few in libc are still required for macros that cdefs.h defines. Keep those.
Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D42385
show more ...
|
| #
c6cc06d4
|
| 30-Aug-2023 |
Robert Clausecker <fuz@FreeBSD.org> |
lib/libc/tests/string: expand memcmp test to bcmp, timingsafe_{b,mem}cmp
The four functions more or less perform the same operation. Reuse the same unit test with slight changes so we can cover them
lib/libc/tests/string: expand memcmp test to bcmp, timingsafe_{b,mem}cmp
The four functions more or less perform the same operation. Reuse the same unit test with slight changes so we can cover them all. Constant-time operation is not verified for the timingsafe_* functions.
Sponsored by: The FreeBSD Foundation Approved by: ngie MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D41528
show more ...
|
| #
b1665806
|
| 14-Jul-2023 |
Robert Clausecker <fuz@FreeBSD.org> |
lib/libc/tests/string/memcmp_test.c: extend test to support custom memcmp function
Extend the tests to permit loading an external memcmp function and testing it over using the libc version. This was
lib/libc/tests/string/memcmp_test.c: extend test to support custom memcmp function
Extend the tests to permit loading an external memcmp function and testing it over using the libc version. This was added by the example of other tests in the test suite doing the same thing and helped tremendously in development.
This change was originally part of D41442 but was taken out to permit separate review as extrapolated from @ngie's request in D41349.
Sponsored by: FreeBSD Foundation Approved by: ngie Differential Revision: https://reviews.freebsd.org/D41528
show more ...
|
| #
1d386b48
|
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
Remove $FreeBSD$: one-line .c pattern
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
|
| #
e0eaabb8
|
| 20-Nov-2024 |
Ed Maste <emaste@FreeBSD.org> |
libc: Have memcmp test what the standard requires
libc's C memcmp currently returns the difference in byte values rather than just -1/0/1 as the AArch64 assembly implementation, many non- FreeBSD im
libc: Have memcmp test what the standard requires
libc's C memcmp currently returns the difference in byte values rather than just -1/0/1 as the AArch64 assembly implementation, many non- FreeBSD implementations, and compiler built-in optimizations do.
It is a bug for a user to expect memcmp to return the difference in the byte values as the compiler is free to inline memcmp() with an implementation that does not do this. Change the test to validate only what the standard requires.
PR: 289084 Reviewed by: markj, fuz Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D52502
show more ...
|
| #
559a218c
|
| 01-Nov-2023 |
Warner Losh <imp@FreeBSD.org> |
libc: Purge unneeded cdefs.h
These sys/cdefs.h are not needed. Purge them. They are mostly left-over from the $FreeBSD$ removal. A few in libc are still required for macros that cdefs.h defines. Kee
libc: Purge unneeded cdefs.h
These sys/cdefs.h are not needed. Purge them. They are mostly left-over from the $FreeBSD$ removal. A few in libc are still required for macros that cdefs.h defines. Keep those.
Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D42385
show more ...
|
| #
c6cc06d4
|
| 30-Aug-2023 |
Robert Clausecker <fuz@FreeBSD.org> |
lib/libc/tests/string: expand memcmp test to bcmp, timingsafe_{b,mem}cmp
The four functions more or less perform the same operation. Reuse the same unit test with slight changes so we can cover them
lib/libc/tests/string: expand memcmp test to bcmp, timingsafe_{b,mem}cmp
The four functions more or less perform the same operation. Reuse the same unit test with slight changes so we can cover them all. Constant-time operation is not verified for the timingsafe_* functions.
Sponsored by: The FreeBSD Foundation Approved by: ngie MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D41528
show more ...
|
| #
b1665806
|
| 14-Jul-2023 |
Robert Clausecker <fuz@FreeBSD.org> |
lib/libc/tests/string/memcmp_test.c: extend test to support custom memcmp function
Extend the tests to permit loading an external memcmp function and testing it over using the libc version. This was
lib/libc/tests/string/memcmp_test.c: extend test to support custom memcmp function
Extend the tests to permit loading an external memcmp function and testing it over using the libc version. This was added by the example of other tests in the test suite doing the same thing and helped tremendously in development.
This change was originally part of D41442 but was taken out to permit separate review as extrapolated from @ngie's request in D41349.
Sponsored by: FreeBSD Foundation Approved by: ngie Differential Revision: https://reviews.freebsd.org/D41528
show more ...
|
| #
1d386b48
|
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
Remove $FreeBSD$: one-line .c pattern
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
|
| #
7e2d4683
|
| 07-Mar-2016 |
Glen Barber <gjb@FreeBSD.org> |
MFH
Sponsored by: The FreeBSD Foundation
|
| #
ee3147b5
|
| 06-Mar-2016 |
Jilles Tjoelker <jilles@FreeBSD.org> |
libc: Add some tests for memcmp().
|
| #
7e2d4683
|
| 07-Mar-2016 |
Glen Barber <gjb@FreeBSD.org> |
MFH
Sponsored by: The FreeBSD Foundation
|
| #
ee3147b5
|
| 06-Mar-2016 |
Jilles Tjoelker <jilles@FreeBSD.org> |
libc: Add some tests for memcmp().
|
| #
e0eaabb8
|
| 20-Nov-2024 |
Ed Maste <emaste@FreeBSD.org> |
libc: Have memcmp test what the standard requires
libc's C memcmp currently returns the difference in byte values rather than just -1/0/1 as the AArch64 assembly implementation, many non- FreeBSD im
libc: Have memcmp test what the standard requires
libc's C memcmp currently returns the difference in byte values rather than just -1/0/1 as the AArch64 assembly implementation, many non- FreeBSD implementations, and compiler built-in optimizations do.
It is a bug for a user to expect memcmp to return the difference in the byte values as the compiler is free to inline memcmp() with an implementation that does not do this. Change the test to validate only what the standard requires.
PR: 289084 Reviewed by: markj, fuz Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D52502
show more ...
|
| #
559a218c
|
| 01-Nov-2023 |
Warner Losh <imp@FreeBSD.org> |
libc: Purge unneeded cdefs.h
These sys/cdefs.h are not needed. Purge them. They are mostly left-over from the $FreeBSD$ removal. A few in libc are still required for macros that cdefs.h defines. Kee
libc: Purge unneeded cdefs.h
These sys/cdefs.h are not needed. Purge them. They are mostly left-over from the $FreeBSD$ removal. A few in libc are still required for macros that cdefs.h defines. Keep those.
Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D42385
show more ...
|
| #
c6cc06d4
|
| 30-Aug-2023 |
Robert Clausecker <fuz@FreeBSD.org> |
lib/libc/tests/string: expand memcmp test to bcmp, timingsafe_{b,mem}cmp
The four functions more or less perform the same operation. Reuse the same unit test with slight changes so we can cover them
lib/libc/tests/string: expand memcmp test to bcmp, timingsafe_{b,mem}cmp
The four functions more or less perform the same operation. Reuse the same unit test with slight changes so we can cover them all. Constant-time operation is not verified for the timingsafe_* functions.
Sponsored by: The FreeBSD Foundation Approved by: ngie MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D41528
show more ...
|
| #
b1665806
|
| 14-Jul-2023 |
Robert Clausecker <fuz@FreeBSD.org> |
lib/libc/tests/string/memcmp_test.c: extend test to support custom memcmp function
Extend the tests to permit loading an external memcmp function and testing it over using the libc version. This was
lib/libc/tests/string/memcmp_test.c: extend test to support custom memcmp function
Extend the tests to permit loading an external memcmp function and testing it over using the libc version. This was added by the example of other tests in the test suite doing the same thing and helped tremendously in development.
This change was originally part of D41442 but was taken out to permit separate review as extrapolated from @ngie's request in D41349.
Sponsored by: FreeBSD Foundation Approved by: ngie Differential Revision: https://reviews.freebsd.org/D41528
show more ...
|
| #
1d386b48
|
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
Remove $FreeBSD$: one-line .c pattern
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
|
| #
7e2d4683
|
| 07-Mar-2016 |
Glen Barber <gjb@FreeBSD.org> |
MFH
Sponsored by: The FreeBSD Foundation
|
| #
ee3147b5
|
| 06-Mar-2016 |
Jilles Tjoelker <jilles@FreeBSD.org> |
libc: Add some tests for memcmp().
|