[FFmpeg-devel] [PATCH] configure: remove false positives with valgrind-memcheck
Pierre-Anthony Lemieux
pal at sandflow.com
Sun Jun 9 19:00:24 EEST 2024
On Sun, Jun 9, 2024 at 6:41 AM James Almer <jamrial at gmail.com> wrote:
>
> On 6/9/2024 2:56 AM, Pierre-Anthony Lemieux wrote:
> > On Sat, Jun 8, 2024 at 6:13 PM James Almer <jamrial at gmail.com> wrote:
> >>
> >> On 6/8/2024 9:59 PM, pal at sandflow.com wrote:
> >>> From: Pierre-Anthony Lemieux <pal at palemieux.com>
> >>>
> >>> If `--toolchain=valgrind-memcheck` is selected, fate-lavf-asf fails on a false positive.
> >>
> >> I can't reproduce this. Tried with both --disable-optimizations and
> >> without it, on Ubuntu 22.04 x86_64.
> >> How are you getting these false positives?
> >
> > Command and log at https://pastebin.com/3TKk0RF4
>
> But that command is missing all the extra args configure adds to the
> invocation, before and after your patch.
Full story.
Before the proposed patch, "./configure --toolchain=valgrind-memcheck;
make fate-lavf-asf" results in "Conditional jump or move depends on
uninitialised value(s)" being emitted on my system (gcc (Ubuntu
9.4.0-1ubuntu1~20.04.1) 9.4.0).
The proposed patch only adds "--expensive-definedness-checks=yes" to
the "valgrind-memcheck" command line -- this was the result of a
discussion on the mailing list.
After the proposed patch, "./configure --toolchain=valgrind-memcheck;
make fate-lavf-asf" does not result in any error being emitted.
The pastebin is intended to isolate the issue/solution. On my system,
adding/removing "--expensive-definedness-checks=yes" to the command
line removes/triggers the issue.
Let me know if you need additional information.
Thanks for reviewing.
>
> >
> >>
> >>> ---
> >>> configure | 2 +-
> >>> 1 file changed, 1 insertion(+), 1 deletion(-)
> >>>
> >>> diff --git a/configure b/configure
> >>> index 6c5b8aab9a..c708f2e38c 100755
> >>> --- a/configure
> >>> +++ b/configure
> >>> @@ -4571,7 +4571,7 @@ case "$toolchain" in
> >>> target_exec_args="--tool=massif --alloc-fn=av_malloc --alloc-fn=av_mallocz --alloc-fn=av_calloc --alloc-fn=av_fast_padded_malloc --alloc-fn=av_fast_malloc --alloc-fn=av_realloc_f --alloc-fn=av_fast_realloc --alloc-fn=av_realloc"
> >>> ;;
> >>> valgrind-memcheck)
> >>> - target_exec_args="--error-exitcode=1 --malloc-fill=0x2a --track-origins=yes --leak-check=full --gen-suppressions=all --suppressions=$source_path/tests/fate-valgrind.supp"
> >>> + target_exec_args="--error-exitcode=1 --expensive-definedness-checks=yes --malloc-fill=0x2a --track-origins=yes --leak-check=full --gen-suppressions=all --suppressions=$source_path/tests/fate-valgrind.supp"
> >>> ;;
> >>> esac
> >>> ;;
> >> _______________________________________________
> >> ffmpeg-devel mailing list
> >> ffmpeg-devel at ffmpeg.org
> >> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> >>
> >> To unsubscribe, visit link above, or email
> >> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".
> > _______________________________________________
> > ffmpeg-devel mailing list
> > ffmpeg-devel at ffmpeg.org
> > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> >
> > To unsubscribe, visit link above, or email
> > ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".
More information about the ffmpeg-devel
mailing list