qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v2 0/9] A couple of fixes for ThreadSanitizer
@ 2016-09-22 10:13 Alex Bennée
  2016-09-22 10:13 ` [Qemu-devel] [PATCH v2 1/9] ui/vnc-enc-tight: remove switch and have single return Alex Bennée
                   ` (9 more replies)
  0 siblings, 10 replies; 19+ messages in thread
From: Alex Bennée @ 2016-09-22 10:13 UTC (permalink / raw)
  To: qemu-devel, pbonzini, cota, stefanha, kwolf
  Cc: mttcg, fred.konrad, a.rigo, bobby.prani, nikunj, mark.burton,
	jan.kiszka, serge.fdrv, rth, peter.maydell, claudio.fontana,
	Alex Bennée

Hi,

This is v2 of the ThreadSanitizer fixes. Changes from the last
version:

  - added Marc-André's review tags
  - added qga/command: use QEMU atomic primitives
  - simplified ui/vnc-enc-tight: remove switch and have single return
  - fixed the Travis CI build (that was painful....)

There is still some work to do to go through and fix warnings from the
sanitizer. Notably "make check" doesn't complete and generates a load
of warnings and I haven't investigated the warnings generated by
co-routines.

With this series applied you can enable ThreadSanitizer with the
following command line:

  ./configure --extra-cflags="-g3 -O0 \
    -fsantize=thread \
    -fsanitize-blacklist=/home/alex/lsrc/qemu/qemu.git/blacklist.tsan" \
    --with-coroutine=gthread --disable-pie --enable-debug --enable-debug-info

breakdown:
  -fsanitize=thread - enables sanitizer
  -fsanitize-blacklist - skip things the compiler finds hard, like SSE
  --with-coroutine=gthread - tsan chokes on other forms of coroutine
  --disable-pie - tsan no longer works with PIE
  --enable-debug --enable-debug-info - better backtraces

Alex Bennée (8):
  ui/vnc-enc-tight: remove switch and have single return
  tcg/optimize: move default return out of if statement
  new: blacklist.tsan
  qom/object: update class cache atomically
  cpu: atomically modify cpu->exit_request
  util/qht: atomically set b->hashes
  qga/command: use QEMU atomic primitives
  .travis.yml: add gcc sanitizer build

Paolo Bonzini (1):
  seqlock: use atomic writes for the sequence

 .travis.yml            | 45 +++++++++++++++++++++++++++++++++++++++++++++
 blacklist.tsan         |  2 ++
 cpu-exec.c             |  8 ++++----
 include/qemu/seqlock.h |  4 ++--
 qga/commands.c         | 17 +++++++++--------
 qom/cpu.c              |  4 ++--
 qom/object.c           | 15 ++++++++-------
 tcg/optimize.c         |  3 +--
 ui/vnc-enc-tight.c     |  6 ++----
 util/qht.c             | 10 +++++-----
 10 files changed, 80 insertions(+), 34 deletions(-)
 create mode 100644 blacklist.tsan

-- 
2.9.3

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2016-09-30 21:31 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-22 10:13 [Qemu-devel] [PATCH v2 0/9] A couple of fixes for ThreadSanitizer Alex Bennée
2016-09-22 10:13 ` [Qemu-devel] [PATCH v2 1/9] ui/vnc-enc-tight: remove switch and have single return Alex Bennée
2016-09-22 10:13 ` [Qemu-devel] [PATCH v2 2/9] tcg/optimize: move default return out of if statement Alex Bennée
2016-09-22 15:35   ` Richard Henderson
2016-09-22 10:13 ` [Qemu-devel] [PATCH v2 3/9] new: blacklist.tsan Alex Bennée
2016-09-22 13:15   ` Eric Blake
2016-09-22 14:11     ` Alex Bennée
2016-09-22 10:13 ` [Qemu-devel] [PATCH v2 4/9] seqlock: use atomic writes for the sequence Alex Bennée
2016-09-22 15:38   ` Richard Henderson
2016-09-22 16:14     ` Paolo Bonzini
2016-09-22 10:13 ` [Qemu-devel] [PATCH v2 5/9] qom/object: update class cache atomically Alex Bennée
2016-09-22 10:13 ` [Qemu-devel] [PATCH v2 6/9] cpu: atomically modify cpu->exit_request Alex Bennée
2016-09-22 10:13 ` [Qemu-devel] [PATCH v2 7/9] util/qht: atomically set b->hashes Alex Bennée
2016-09-27 17:36   ` Emilio G. Cota
2016-09-27 21:03     ` Alex Bennée
2016-09-22 10:13 ` [Qemu-devel] [PATCH v2 8/9] qga/command: use QEMU atomic primitives Alex Bennée
2016-09-22 10:13 ` [Qemu-devel] [PATCH v2 9/9] .travis.yml: add gcc sanitizer build Alex Bennée
2016-09-30 11:32 ` [Qemu-devel] [PATCH v2 0/9] A couple of fixes for ThreadSanitizer Paolo Bonzini
2016-09-30 21:31   ` Alex Bennée

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).