From: Wolfgang Bumiller Date: Fri, 26 Sep 2014 13:25:33 +0000 (+0200) Subject: For now I'll just disable this X-Git-Tag: xonotic-v0.8.1~9^2~22 X-Git-Url: https://git.xonotic.org/?p=xonotic%2Fgmqcc.git;a=commitdiff_plain;h=beaba494b553421e4eaba1a72262ad354bf4a217 For now I'll just disable this --- diff --git a/Makefile b/Makefile index f6a21ff..7697cfc 100644 --- a/Makefile +++ b/Makefile @@ -17,7 +17,8 @@ ifeq ($(CC), clang) -Wno-unknown-warning-option \ -Wno-cast-align \ -Wno-assign-enum \ - -pedantic-errors + -pedantic-errors \ + -fsanitize=address -fno-omit-frame-pointer else ifneq ($(CC), g++) CFLAGS += -Wmissing-prototypes -Wstrict-prototypes @@ -41,7 +42,7 @@ endif # do this last otherwise there is whitespace in the command output and # it makes my OCD act up CFLAGS += $(OPTIONAL_CFLAGS) -LDFLAGS += $(OPTIONAL_LDFLAGS) +LDFLAGS += $(OPTIONAL_LDFLAGS) -fsanitize=address -fno-omit-frame-pointer #we have duplicate object files when dealing with creating a simple list #for dependinces. To combat this we use some clever recrusive-make to diff --git a/hash.c b/hash.c index bc65b7f..46edc74 100644 --- a/hash.c +++ b/hash.c @@ -22,6 +22,7 @@ */ #include "gmqcc.h" #include +#include #if defined(_MSC_VER) # define HASH_ROTL32(X, Y) _rotl((X), (Y)) @@ -224,6 +225,7 @@ static GMQCC_FORCEINLINE uint32_t hash_murmur(const void *GMQCC_RESTRICT key, si } size_t hash(const char *key) { +#if 0 const char *s = key; const char *a = s; const size_t *w; @@ -236,6 +238,9 @@ size_t hash(const char *key) { for (s = (const char *)w; *s; s++); return hash_murmur((const void *)key, s-a); +#else + return hash_murmur((const void *)key, strlen(key)); +#endif } #undef HASH_ROTL32