Some fixes

This commit is contained in:
Dale Weiler 2014-09-28 20:28:56 -04:00
parent 641136fee3
commit de22dec56b
3 changed files with 5 additions and 2 deletions

View file

@ -21,6 +21,8 @@ GITINFO :=
-Wno-unknown-warning-option\
-Wno-cast-align\
-Wno-assign-enum\
-Wno-empty-body\
-Wno-date-time\
-pedantic-errors
.else
. if $(CC) != g++

View file

@ -18,6 +18,7 @@ ifeq ($(CC), clang)
-Wno-cast-align \
-Wno-assign-enum \
-Wno-empty-body \
-Wno-date-time \
-pedantic-errors
else
ifneq ($(CC), g++)

4
hash.c
View file

@ -314,12 +314,12 @@ static ASAN_DISABLE size_t hash_strlen(const char *key) {
}
VALGRIND_MAKE_MEM_DEFINED(s, STRLEN_ALIGN);
for (w = (const void *)s; !STRLEN_HASZERO(*w); w++) {
for (w = (const size_t *)s; !STRLEN_HASZERO(*w); w++) {
/* Make the next word legal to access */
VALGRIND_MAKE_MEM_DEFINED(w + STRLEN_ALIGN, STRLEN_ALIGN);
}
for (s = (const void *)w; *s; s++);
for (s = (const char *)w; *s; s++);
/* It's not legal to access this area anymore */
VALGRIND_MAKE_MEM_NOACCESS(s + 1, STRLEN_ALIGN);