-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
# 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
*/
#include "gmqcc.h"
#include <limits.h>
+#include <string.h>
#if defined(_MSC_VER)
# define HASH_ROTL32(X, Y) _rotl((X), (Y))
}
size_t hash(const char *key) {
+#if 0
const char *s = key;
const char *a = s;
const size_t *w;
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