qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug 1910505] [NEW] atomic failure linking with --enable-sanitizers


From: Paolo Bonzini
Subject: Re: [Bug 1910505] [NEW] atomic failure linking with --enable-sanitizers on 32-bit Linux hosts
Date: Thu, 7 Jan 2021 11:23:31 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.5.0

On 07/01/21 10:10, Philippe Mathieu-Daudé wrote:
libblock.fa(block_io.c.o): In function `stat64_max':
include/qemu/stats64.h:58: undefined reference to `__atomic_load_8'
include/qemu/stats64.h:60: undefined reference to
`__atomic_compare_exchange_8'
libblock.fa(block_qapi.c.o): In function `stat64_get':
include/qemu/stats64.h:40: undefined reference to `__atomic_load_8'
libqemuutil.a(util_qsp.c.o): In function `qatomic_set_u64':
include/qemu/atomic.h:478: undefined reference to `__atomic_store_8'
libqemuutil.a(util_qsp.c.o): In function `qatomic_read_u64':
include/qemu/atomic.h:468: undefined reference to `__atomic_load_8'
clang: error: linker command failed with exit code 1 (use -v to see
invocation)

Issue previously reported on the list here:
https://www.mail-archive.com/qemu-devel@nongnu.org/msg770128.html

Looks like 64-bit atomics are available without sanitizers, but fall back to libatomic with sanitizers (tsan probably?).

So CONFIG_ATOMIC64 is not detected properly in configure, because -fsanitize=* flags are added (at "end of CC checks" around line 5000) after the atomic64 test (around 400 lines before that).

I'm not sure what breaks if -fsanitize flags are added earlier.

Paolo




reply via email to

[Prev in Thread] Current Thread [Next in Thread]