All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: QEMU Developers <qemu-devel@nongnu.org>,
	Luiz Capitulino <lcapitulino@redhat.com>
Subject: Re: [Qemu-devel] test-qapi-visit causes clang -fsanitize=undefined warning
Date: Mon, 10 Mar 2014 14:36:47 +0100	[thread overview]
Message-ID: <87eh2a89ao.fsf@blackfin.pond.sub.org> (raw)
In-Reply-To: <CAFEAcA_O8ToNEu17sXN3pNQwyxKvvbAOF229wriwxyL=_B-90A@mail.gmail.com> (Peter Maydell's message of "Mon, 10 Mar 2014 12:27:35 +0000")

Peter Maydell <peter.maydell@linaro.org> writes:

> On 10 March 2014 12:21, Markus Armbruster <armbru@redhat.com> wrote:
>> My local clang doesn't complain.  May I have your clang version, exact
>> invocation and output?
>
> clang version 3.3 (tags/RELEASE_33/final)
>
> mkdir build/clang
> (cd build/clang && '../../configure' '--cc=clang' '--cxx=clang++'
> '--enable-gtk' '--target-list=arm-softmmu'
> '--extra-cflags=-fsanitize=undefined')
> make -C build/clang -j4
> cd build/clang
> tests/test-qmp-input-strict
>
> Output is:
>
> /visitor/input-strict/pass/struct: OK
> /visitor/input-strict/pass/struct-nested: OK
> /visitor/input-strict/pass/list: OK
> /visitor/input-strict/pass/union: OK
> /visitor/input-strict/pass/union-flat: OK
> /visitor/input-strict/pass/union-anon: OK
> /visitor/input-strict/fail/struct: OK
> /visitor/input-strict/fail/struct-nested: OK
> /visitor/input-strict/fail/list: OK
> /visitor/input-strict/fail/union: OK
> /visitor/input-strict/fail/union-flat: tests/test-qapi-visit.c:462:33:
> runtime error: member access within null pointer of type 'UserDefA'
> (aka 'struct UserDefA')
> OK
> /visitor/input-strict/fail/union-anon: OK

Turns out my clang installation doesn't support -fsanitize=undefined: it
lacks libclang_rt.san-x86_64.a.

Test works fine without -fsanitize=undefined.  I set a breakpoint on
visit_type_UserDefA_fields, and there's no null pointer to be found.

Looks like I have to upgrade clang before I can make progress.

  reply	other threads:[~2014-03-10 13:37 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-08 12:39 [Qemu-devel] test-qapi-visit causes clang -fsanitize=undefined warning Peter Maydell
2014-03-08 14:03 ` Peter Maydell
2014-03-10  9:45   ` Markus Armbruster
2014-03-10 12:21 ` Markus Armbruster
2014-03-10 12:27   ` Peter Maydell
2014-03-10 13:36     ` Markus Armbruster [this message]
2014-03-10 13:41       ` Peter Maydell
2014-03-10 18:21         ` Markus Armbruster
2014-03-11 12:29           ` Kevin Wolf

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=87eh2a89ao.fsf@blackfin.pond.sub.org \
    --to=armbru@redhat.com \
    --cc=lcapitulino@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /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.