qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Alexander Bulekov <alxndr@bu.edu>, qemu-devel@nongnu.org
Cc: Laurent Vivier <lvivier@redhat.com>, Bandan Das <bsd@redhat.com>,
	Thomas Huth <thuth@redhat.com>,
	Stefan Hajnoczi <stefanha@redhat.com>
Subject: Re: [PATCH] fuzz: Add support for custom fuzzing library
Date: Tue, 1 Sep 2020 21:00:48 +0200	[thread overview]
Message-ID: <7e47f86a-e35c-12f5-d421-da1b64478b39@redhat.com> (raw)
In-Reply-To: <20200901181800.326382-1-alxndr@bu.edu>

On 01/09/20 20:18, Alexander Bulekov wrote:
> ---
>  configure                    | 12 ++++++++++--
>  meson.build                  |  6 +++++-
>  tests/qtest/fuzz/meson.build |  5 ++---
>  3 files changed, 17 insertions(+), 6 deletions(-)
> 
> 
> Hi Paolo,
> Here I'm trying to specify the linker-script with
> add_project_link_arguments. How I'm testing this:
> 
> $ CC=clang-10 CXX=clang++-10 ../configure --enable-fuzzing
> $ make V=1 "-j$(nproc)" qemu-fuzz-i386
> 
> clang++-10  -o qemu-fuzz-i386 qemu-fuzz-i386.p/tests_qtest_fuzz_qtest_wrappers.c.o \
> ... libblock.fa chardev/libchardev.fa \
> -Wl,--start-group tests/qtest/libqos/libqos.a -Wl,--no-whole-archive \
> -Wl,-T,/home/alxndr/Development/qemu/tests/qtest/fuzz/fork_fuzz.ld \
> ... \
> -Wl,-rpath-link,/home/alxndr/Development/qemu/build/ -lstdc++ -Wl,--end-group
> 
> Maybe if I can get the oss-fuzz LIB_FUZZING_ENGINE
> (/usr/lib/libFuzzingEngine.a) into the --start-group, that could also
> solve the issue... I'll take another look at exactly what the oss-fuzz
> build container does.

Actually your patch is pretty close, just by hacking

diff --git a/tests/qtest/libqos/meson.build b/tests/qtest/libqos/meson.build
index 19931b9248..2bc46c5a84 100644
--- a/tests/qtest/libqos/meson.build
+++ b/tests/qtest/libqos/meson.build
@@ -52,6 +52,6 @@ libqos = static_library('qos',
         'arm-xilinx-zynq-a9-machine.c',
         'ppc64_pseries-machine.c',
         'x86_64_pc-machine.c',
-), build_by_default: false)
+), name_suffix: 'fa', build_by_default: false)

 qos = declare_dependency(link_whole: libqos)

I can get it to work.  Better find a way to fix it in Meson though,
because relying on the ".a" suffix is very brittle.

Paolo



  parent reply	other threads:[~2020-09-01 19:02 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-23 22:58 [Fwd] Issue 25164 in oss-fuzz: qemu: Fuzzing build failure Alexander Bulekov
2020-08-25  7:58 ` Paolo Bonzini
2020-08-26 13:55   ` Alexander Bulekov
2020-08-26 15:15     ` Paolo Bonzini
2020-08-28 18:33       ` Alexander Bulekov
2020-08-28 19:41         ` Paolo Bonzini
2020-09-01 18:18           ` [PATCH] fuzz: Add support for custom fuzzing library Alexander Bulekov
2020-09-01 18:39             ` Paolo Bonzini
2020-09-01 19:00             ` Paolo Bonzini [this message]
2020-09-02 12:27             ` no-reply
2020-09-02 12:31             ` no-reply
2020-09-02 12:33             ` no-reply

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=7e47f86a-e35c-12f5-d421-da1b64478b39@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=alxndr@bu.edu \
    --cc=bsd@redhat.com \
    --cc=lvivier@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    --cc=thuth@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 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).