* [PATCH] fuzz: disable leak-detection for oss-fuzz builds
@ 2024-05-27 14:59 Alexander Bulekov
2024-05-27 16:08 ` Philippe Mathieu-Daudé
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Alexander Bulekov @ 2024-05-27 14:59 UTC (permalink / raw)
To: qemu-devel
Cc: Alexander Bulekov, Paolo Bonzini, Bandan Das, Stefan Hajnoczi,
Thomas Huth, Darren Kenny, Qiuhao Li
When we are building for OSS-Fuzz, we want to ensure that the fuzzer
targets are actually created, regardless of leaks. Leaks will be
detected by the subsequent tests of the individual fuzz-targets.
Signed-off-by: Alexander Bulekov <alxndr@bu.edu>
---
scripts/oss-fuzz/build.sh | 1 +
1 file changed, 1 insertion(+)
diff --git a/scripts/oss-fuzz/build.sh b/scripts/oss-fuzz/build.sh
index 5238f83343..7398298173 100755
--- a/scripts/oss-fuzz/build.sh
+++ b/scripts/oss-fuzz/build.sh
@@ -92,6 +92,7 @@ make install DESTDIR=$DEST_DIR/qemu-bundle
rm -rf $DEST_DIR/qemu-bundle/opt/qemu-oss-fuzz/bin
rm -rf $DEST_DIR/qemu-bundle/opt/qemu-oss-fuzz/libexec
+export ASAN_OPTIONS=detect_leaks=0
targets=$(./qemu-fuzz-i386 | grep generic-fuzz | awk '$1 ~ /\*/ {print $2}')
base_copy="$DEST_DIR/qemu-fuzz-i386-target-$(echo "$targets" | head -n 1)"
--
2.45.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] fuzz: disable leak-detection for oss-fuzz builds
2024-05-27 14:59 [PATCH] fuzz: disable leak-detection for oss-fuzz builds Alexander Bulekov
@ 2024-05-27 16:08 ` Philippe Mathieu-Daudé
2024-05-29 6:01 ` Thomas Huth
2024-05-29 7:43 ` Thomas Huth
2 siblings, 0 replies; 4+ messages in thread
From: Philippe Mathieu-Daudé @ 2024-05-27 16:08 UTC (permalink / raw)
To: Alexander Bulekov, qemu-devel
Cc: Paolo Bonzini, Bandan Das, Stefan Hajnoczi, Thomas Huth,
Darren Kenny, Qiuhao Li
On 27/5/24 16:59, Alexander Bulekov wrote:
> When we are building for OSS-Fuzz, we want to ensure that the fuzzer
> targets are actually created, regardless of leaks. Leaks will be
> detected by the subsequent tests of the individual fuzz-targets.
>
> Signed-off-by: Alexander Bulekov <alxndr@bu.edu>
> ---
> scripts/oss-fuzz/build.sh | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/scripts/oss-fuzz/build.sh b/scripts/oss-fuzz/build.sh
> index 5238f83343..7398298173 100755
> --- a/scripts/oss-fuzz/build.sh
> +++ b/scripts/oss-fuzz/build.sh
> @@ -92,6 +92,7 @@ make install DESTDIR=$DEST_DIR/qemu-bundle
> rm -rf $DEST_DIR/qemu-bundle/opt/qemu-oss-fuzz/bin
> rm -rf $DEST_DIR/qemu-bundle/opt/qemu-oss-fuzz/libexec
>
> +export ASAN_OPTIONS=detect_leaks=0
> targets=$(./qemu-fuzz-i386 | grep generic-fuzz | awk '$1 ~ /\*/ {print $2}')
> base_copy="$DEST_DIR/qemu-fuzz-i386-target-$(echo "$targets" | head -n 1)"
>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] fuzz: disable leak-detection for oss-fuzz builds
2024-05-27 14:59 [PATCH] fuzz: disable leak-detection for oss-fuzz builds Alexander Bulekov
2024-05-27 16:08 ` Philippe Mathieu-Daudé
@ 2024-05-29 6:01 ` Thomas Huth
2024-05-29 7:43 ` Thomas Huth
2 siblings, 0 replies; 4+ messages in thread
From: Thomas Huth @ 2024-05-29 6:01 UTC (permalink / raw)
To: Alexander Bulekov, qemu-devel
Cc: Paolo Bonzini, Bandan Das, Stefan Hajnoczi, Darren Kenny,
Qiuhao Li
On 27/05/2024 16.59, Alexander Bulekov wrote:
> When we are building for OSS-Fuzz, we want to ensure that the fuzzer
> targets are actually created, regardless of leaks. Leaks will be
> detected by the subsequent tests of the individual fuzz-targets.
>
> Signed-off-by: Alexander Bulekov <alxndr@bu.edu>
> ---
> scripts/oss-fuzz/build.sh | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/scripts/oss-fuzz/build.sh b/scripts/oss-fuzz/build.sh
> index 5238f83343..7398298173 100755
> --- a/scripts/oss-fuzz/build.sh
> +++ b/scripts/oss-fuzz/build.sh
> @@ -92,6 +92,7 @@ make install DESTDIR=$DEST_DIR/qemu-bundle
> rm -rf $DEST_DIR/qemu-bundle/opt/qemu-oss-fuzz/bin
> rm -rf $DEST_DIR/qemu-bundle/opt/qemu-oss-fuzz/libexec
>
> +export ASAN_OPTIONS=detect_leaks=0
> targets=$(./qemu-fuzz-i386 | grep generic-fuzz | awk '$1 ~ /\*/ {print $2}')
> base_copy="$DEST_DIR/qemu-fuzz-i386-target-$(echo "$targets" | head -n 1)"
Would it maybe also make sense to check that $targets is not empty and error
out in case it is?
Thomas
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] fuzz: disable leak-detection for oss-fuzz builds
2024-05-27 14:59 [PATCH] fuzz: disable leak-detection for oss-fuzz builds Alexander Bulekov
2024-05-27 16:08 ` Philippe Mathieu-Daudé
2024-05-29 6:01 ` Thomas Huth
@ 2024-05-29 7:43 ` Thomas Huth
2 siblings, 0 replies; 4+ messages in thread
From: Thomas Huth @ 2024-05-29 7:43 UTC (permalink / raw)
To: Alexander Bulekov, qemu-devel
Cc: Paolo Bonzini, Bandan Das, Stefan Hajnoczi, Darren Kenny,
Qiuhao Li
On 27/05/2024 16.59, Alexander Bulekov wrote:
> When we are building for OSS-Fuzz, we want to ensure that the fuzzer
> targets are actually created, regardless of leaks. Leaks will be
> detected by the subsequent tests of the individual fuzz-targets.
>
> Signed-off-by: Alexander Bulekov <alxndr@bu.edu>
> ---
> scripts/oss-fuzz/build.sh | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/scripts/oss-fuzz/build.sh b/scripts/oss-fuzz/build.sh
> index 5238f83343..7398298173 100755
> --- a/scripts/oss-fuzz/build.sh
> +++ b/scripts/oss-fuzz/build.sh
> @@ -92,6 +92,7 @@ make install DESTDIR=$DEST_DIR/qemu-bundle
> rm -rf $DEST_DIR/qemu-bundle/opt/qemu-oss-fuzz/bin
> rm -rf $DEST_DIR/qemu-bundle/opt/qemu-oss-fuzz/libexec
>
> +export ASAN_OPTIONS=detect_leaks=0
> targets=$(./qemu-fuzz-i386 | grep generic-fuzz | awk '$1 ~ /\*/ {print $2}')
> base_copy="$DEST_DIR/qemu-fuzz-i386-target-$(echo "$targets" | head -n 1)"
I've applied your patch, but it seems the leak is not detected later in the
individual fuzz-targets anymore. That's strange... did you have a closer
look already where this leak here comes from?
Thomas
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-05-29 7:43 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-27 14:59 [PATCH] fuzz: disable leak-detection for oss-fuzz builds Alexander Bulekov
2024-05-27 16:08 ` Philippe Mathieu-Daudé
2024-05-29 6:01 ` Thomas Huth
2024-05-29 7:43 ` Thomas Huth
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).