How can i build DBus with TSAN?

Simon McVittie smcv at collabora.com
Mon Nov 21 12:03:34 UTC 2022


On Sat, 19 Nov 2022 at 07:27:30 +0100, Dennis Luehring wrote:
> cmake ../dbus -Db_sanitize=thread

b_sanitize is a Meson option, not a CMake option. CMake and Meson
do a similar job, but are alternatives to each other and are not
interchangeable.

The dbus 1.15.x development branch can be compiled using Meson, similar
to GLib (see Meson documentation for general information).

If you would prefer to use the dbus 1.14.x stable branch, use Autotools
(recommended for Linux and other Unix systems), something like this:

    ../configure SANITIZE_CFLAGS="-fsanitize=thread -static-libtsan"

or use CMake but use a correct CMake option instead of a Meson option.
I don't know what is the usual way to enable tsan on CMake, perhaps
something like this:

    cmake .. -DCMAKE_C_FLAGS_DEBUG="-fsanitize=thread -static-libtsan"

  smcv


More information about the dbus mailing list