mirror of
https://github.com/zeek/zeek.git
synced 2025-10-06 00:28:21 +00:00
Fix md5 problem with freebsd 11.0 clang 3.8
With clang on FreeBSD 11.0-p1, some md5 functions tend to return the wrong result. This is, e.g., visible when running the bifs/md5 testcase. In this test, the checks using md5_hash_finish will return an empty string. The apparent cause is some confusion in clang when using a static char inside a static inline function that is refered to several compilation units. Exact version of clang showing this issue is: FreeBSD clang version 3.8.0 (tags/RELEASE_380/final 262564) (based on LLVM 3.8.0) Target: x86_64-unknown-freebsd11.0 Thread model: posix InstalledDir: /usr/bin Issue occurs with -O2. The first person to either find an existing clang bugreport for this, or to create an minimal testcase and files one will get a drink from me :)
This commit is contained in:
parent
14fd08f334
commit
f135a63c61
1 changed files with 1 additions and 1 deletions
|
@ -12,7 +12,7 @@
|
|||
|
||||
#include "Reporter.h"
|
||||
|
||||
static inline const char* digest_print(const u_char* digest, size_t n)
|
||||
inline const char* digest_print(const u_char* digest, size_t n)
|
||||
{
|
||||
static char buf[256]; // big enough for any of md5/sha1/sha256
|
||||
for ( size_t i = 0; i < n; ++i )
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue