summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2016-08-06 17:02:17 +0200
committerGitHub <noreply@github.com>2016-08-06 17:02:17 +0200
commit23dab159d7f2c474bfca07e72ee9fe44947178f6 (patch)
tree96f2008852c988ea8202d71ef7cf57211ce42c12
parent3bb81a80bd18c15a1befb4de9a4cf9a5b77ae354 (diff)
parent7dbe0b72c5666a0e0a73cefac2b1c253bce5deef (diff)
Merge pull request #3911 from crrodriguez/asan-fixes
Asan fixes
-rw-r--r--src/journal/lookup3.c6
-rw-r--r--src/test/test-id128.c2
-rw-r--r--src/test/test-sigbus.c3
3 files changed, 7 insertions, 4 deletions
diff --git a/src/journal/lookup3.c b/src/journal/lookup3.c
index 3d791234f4..d8f1a4977d 100644
--- a/src/journal/lookup3.c
+++ b/src/journal/lookup3.c
@@ -317,7 +317,7 @@ uint32_t jenkins_hashlittle( const void *key, size_t length, uint32_t initval)
* still catch it and complain. The masking trick does make the hash
* noticeably faster for short strings (like English words).
*/
-#ifndef VALGRIND
+#if !defined(VALGRIND) && !defined(__SANITIZE_ADDRESS__)
switch(length)
{
@@ -503,7 +503,7 @@ void jenkins_hashlittle2(
* still catch it and complain. The masking trick does make the hash
* noticeably faster for short strings (like English words).
*/
-#ifndef VALGRIND
+#if !defined(VALGRIND) && !defined(__SANITIZE_ADDRESS__)
switch(length)
{
@@ -681,7 +681,7 @@ uint32_t jenkins_hashbig( const void *key, size_t length, uint32_t initval)
* still catch it and complain. The masking trick does make the hash
* noticeably faster for short strings (like English words).
*/
-#ifndef VALGRIND
+#if !defined(VALGRIND) && !defined(__SANITIZE_ADDRESS__)
switch(length)
{
diff --git a/src/test/test-id128.c b/src/test/test-id128.c
index f01fbdd6b2..1c8e5549da 100644
--- a/src/test/test-id128.c
+++ b/src/test/test-id128.c
@@ -144,7 +144,7 @@ int main(int argc, char *argv[]) {
assert_se(ftruncate(fd, 0) >= 0);
assert_se(sd_id128_randomize(&id) >= 0);
- assert_se(write(fd, id128_to_uuid_string(id, t), 36) == 36);
+ assert_se(write(fd, id128_to_uuid_string(id, q), 36) == 36);
assert_se(lseek(fd, 0, SEEK_SET) == 0);
assert_se(id128_read_fd(fd, ID128_PLAIN, &id2) == -EINVAL);
diff --git a/src/test/test-sigbus.c b/src/test/test-sigbus.c
index 17b81747be..02b8e24308 100644
--- a/src/test/test-sigbus.c
+++ b/src/test/test-sigbus.c
@@ -29,6 +29,9 @@ int main(int argc, char *argv[]) {
void *addr = NULL;
uint8_t *p;
+#ifdef __SANITIZE_ADDRESS__
+ return EXIT_TEST_SKIP;
+#endif
sigbus_install();
assert_se(sigbus_pop(&addr) == 0);