[PATCH 0/2] libsanitizer: Merge with upstream commit fdf4c035225d
Gerald Pfeifer
gerald@pfeifer.com
Sat Oct 9 22:28:14 GMT 2021
On Thu, 7 Oct 2021, H.J. Lu wrote:
>> Thus breaking bootstrap on FreeBSD:
>>
>> GCC-HEAD/libsanitizer/sanitizer_common/sanitizer_platform_limits_freebsd.cpp:370:36: error: 'MD5_CTX' was not declared in this scope
> 370 | const unsigned MD5_CTX_sz = sizeof(MD5_CTX);
>> | ^~~~~~~
>> GCC-HEAD/libsanitizer/sanitizer_common/sanitizer_platform_limits_freebsd.cpp:371:36: error:
>> 'MD5_DIGEST_STRING_LENGTH' was not declared in this scope
> compiler-rt sync brought in
>
> commit 18a7ebda99044473fdbce6376993714ff54e6690
> Author: David Carlier <devnexen@gmail.com>
> Date: Wed Oct 6 06:01:50 2021 +0100
>
> [Sanitizers] intercept md5 and sha* apis on FreeBSD.
>
> Reviewed By: vitalybuka
>
> Differential Revision: https://reviews.llvm.org/D110989
>
> diff --git a/libsanitizer/sanitizer_common/sanitizer_platform_limits_freebsd.cpp
> b/libsanitizer/sanitizer_common/sanitizer_platform_limits_freebsd.cpp
> index bfe3eea464d..64535805e40 100644
> --- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_freebsd.cpp
> +++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_freebsd.cpp
> @@ -69,6 +69,11 @@
> #include <semaphore.h>
> #include <signal.h>
> #include <stddef.h>
> +#include <md5.h>
Yep, and here is the problem: In the case of Clang this uses FreeBSD's
<md5.h>.
In the case of GCC apparently this uses our own, bare-bone md5.h -
include/md5.h.
Boom. Regression. Bootstrap failure on every platfor and version of
FreeBSD. (FreeBSD 11.x is also broken by this patch, in a different
way, alas went end of life a week ago.)
I now filed https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102675 and
sadly don't have an idea how to tackle this.
Gerald
More information about the Gcc-patches
mailing list