You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ext/standard/tests/strings/crypt_sha256.phpt: fix on musl
Among other things, this test tries to run too few and too many rounds
of SHA256. In both cases, it is expecting an error, but that behavior
depends on the implementation:
* PHP's own implementation raises an error in either case
* libxcrypt raises an error in either case
* Older versions of glibc would clamp the number of rounds
to a valid amount (newer versions don't have libcrypt)
* Musl libc clamps values that are too low, but raises an error
for values that are too high
If PHP is built with --with-external-libcrypt, the musl implementation
above can be used. Even if libxcrypt is installed, PHP will notice
that no additional -lfoo flags are needed to use the crypt
implementation in musl. To pass on such a system, we must not test
for the "too few rounds" behavior.
0 commit comments