All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: "Stefan Hajnoczi" <stefanha@redhat.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Emilio G. Cota" <cota@braap.org>,
	"Alex Bennée" <alex.bennee@linaro.org>,
	"Richard Henderson" <richard.henderson@linaro.org>,
	"Marc-André Lureau" <marcandre.lureau@redhat.com>
Cc: qemu-devel@nongnu.org, Qemu-block <qemu-block@nongnu.org>
Subject: Re: [Bug 1910505] [NEW] atomic failure linking with --enable-sanitizers on 32-bit Linux hosts
Date: Thu, 7 Jan 2021 10:10:16 +0100	[thread overview]
Message-ID: <88bee064-f323-366a-7931-dc4bc40057e3@redhat.com> (raw)
In-Reply-To: <161000881348.18330.2540162310564338256.malonedeb@gac.canonical.com>

Cc'ing atomic team and qemu-block@ for "qemu/stats64.h".

On 1/7/21 9:40 AM, Philippe Mathieu-Daudé wrote:
> Public bug reported:
> 
> As of commit 50536341b47, using --enable-sanitizers on 32-bit Linux host:
> - displays various warnings
> - fails linking
> 
> Using Ubuntu 18.04 (release 20201211.1) and Clang10 on i386:
> 
> [139/675] Compiling C object softmmu.fa.p/softmmu_icount.c.o
> In file included from ../softmmu/icount.c:31:
> In file included from include/exec/exec-all.h:23:
> In file included from ../target/mips/cpu.h:4:
> In file included from ../target/mips/cpu-qom.h:23:
> In file included from include/hw/core/cpu.h:23:
> In file included from include/hw/qdev-core.h:5:
> In file included from include/qemu/bitmap.h:16:
> In file included from include/qemu/bitops.h:17:
> include/qemu/atomic.h:463:12: warning: misaligned atomic operation may
> incur significant performance penalty [-Watomic-alignment]
>     return qatomic_read__nocheck(ptr);
>            ^
> include/qemu/atomic.h:129:5: note: expanded from macro
> 'qatomic_read__nocheck'
>     __atomic_load_n(ptr, __ATOMIC_RELAXED)
>     ^
> include/qemu/atomic.h:473:5: warning: misaligned atomic operation may
> incur significant performance penalty [-Watomic-alignment]
>     qatomic_set__nocheck(ptr, val);
>     ^
> include/qemu/atomic.h:138:5: note: expanded from macro
> 'qatomic_set__nocheck'
>     __atomic_store_n(ptr, i, __ATOMIC_RELAXED)
>     ^
> 2 warnings generated.
> [...]
> 
> [850/2216] Linking target tests/test-hbitmap
> FAILED: tests/test-hbitmap
> clang  -o tests/test-hbitmap tests/test-hbitmap.p/test-hbitmap.c.o
> tests/test-hbitmap.p/iothread.c.o -Wl,--as-needed -Wl,--no-undefined
> -pie -Wl,--whole-archive libblock.fa libcrypto.fa libauthz.fa libqom.fa
> libio.fa -Wl,--no-whole-archive -Wl,--warn-common -fsanitize=undefined
> -fsanitize=address -Wl,-z,relro -Wl,-z,now -m32 -ggdb
> -fstack-protector-strong -Wl,--start-group libqemuutil.a
> subprojects/libvhost-user/libvhost-user-glib.a
> subprojects/libvhost-user/libvhost-user.a libblock.fa libcrypto.fa
> libauthz.fa libqom.fa libio.fa @block.syms -lgio-2.0 -lgobject-2.0
> -lglib-2.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0 -pthread -lutil -lgnutls
> -lm -lgthread-2.0 -lglib-2.0 /usr/lib/i386-linux-gnu/libglib-2.0.so
> -liscsi -lgthread-2.0 -lglib-2.0 -laio -lcurl
> /usr/lib/i386-linux-gnu/libz.so -lrbd -lrados -lnettle -lgnutls
> -Wl,--end-group
> 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
> 
> ** Affects: qemu
>      Importance: Undecided
>          Status: New
> 



  reply	other threads:[~2021-01-07  9:11 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-07  8:40 [Bug 1910505] [NEW] atomic failure linking with --enable-sanitizers on 32-bit Linux hosts Philippe Mathieu-Daudé
2021-01-07  9:10 ` Philippe Mathieu-Daudé [this message]
2021-01-07 10:23   ` Paolo Bonzini
2021-05-09 15:44 ` [Bug 1910505] " Philippe Mathieu-Daudé

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=88bee064-f323-366a-7931-dc4bc40057e3@redhat.com \
    --to=philmd@redhat.com \
    --cc=alex.bennee@linaro.org \
    --cc=cota@braap.org \
    --cc=marcandre.lureau@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --cc=stefanha@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.