summary refs log tree commit diff stats
path: root/include/qemu/lockable.h
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2018-02-15 22:25:48 +0100
committerPaolo Bonzini <pbonzini@redhat.com>2018-03-06 14:01:27 +0100
commit80818e9ecbc6f7463ea47d0aae8d4a43ea030304 (patch)
treec9dd3109fd223cde0ccaf29431540ceabe7aa940 /include/qemu/lockable.h
parentb9f44da2f2cdc1a1a1be5aed0c46bd7fcc69cf4a (diff)
downloadfocaccia-qemu-80818e9ecbc6f7463ea47d0aae8d4a43ea030304.tar.gz
focaccia-qemu-80818e9ecbc6f7463ea47d0aae8d4a43ea030304.zip
lockable: workaround GCC link issue with ASAN
Current GCC has an optimization bug when compiling with ASAN.

See also GCC bug:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84307

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20180215212552.26997-3-marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'include/qemu/lockable.h')
-rw-r--r--include/qemu/lockable.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/qemu/lockable.h b/include/qemu/lockable.h
index b6ed6c89ec..84ea794bcf 100644
--- a/include/qemu/lockable.h
+++ b/include/qemu/lockable.h
@@ -28,7 +28,7 @@ struct QemuLockable {
  * to QEMU_MAKE_LOCKABLE.  For optimized builds, we can rely on dead-code elimination
  * from the compiler, and give the errors already at link time.
  */
-#ifdef __OPTIMIZE__
+#if defined(__OPTIMIZE__) && !defined(__SANITIZE_ADDRESS__)
 void unknown_lock_type(void *);
 #else
 static inline void unknown_lock_type(void *unused)