public inbox for gcc-regression@sourceware.org
help / color / mirror / Atom feed
From: Maxim Kuvyrkov <maxim.kuvyrkov@linaro.org>
To: Nikita Popov <npv1310@gmail.com>
Cc: gcc-regression@gcc.gnu.org
Subject: Re: [TCWG CI] Regression caused by binutils: Fix an undefined behaviour in the BFD library's DWARF parser.
Date: Tue, 21 Dec 2021 17:20:56 +0300 [thread overview]
Message-ID: <7DA11ADD-CF85-4060-9024-D89C8085C401@linaro.org> (raw)
In-Reply-To: <1686945914.6118.1639941676362@jenkins.jenkins>
Hi Nikita,
This was sent out due to a bug in our CI. Sorry for the noise.
Regards,
--
Maxim Kuvyrkov
https://www.linaro.org
> On 19 Dec 2021, at 22:21, ci_notify@linaro.org wrote:
>
> [TCWG CI] Regression caused by binutils: Fix an undefined behaviour in the BFD library's DWARF parser.:
> commit 4d3605c8ca92bcde848581a8ec031827c798501b
> Author: Nikita Popov <npv1310@gmail.com>
>
> Fix an undefined behaviour in the BFD library's DWARF parser.
>
> Results regressed to
> # reset_artifacts:
> -10
> # build_abe binutils:
> -9
> # build_abe stage1 -- --set gcc_override_configure=--disable-libsanitizer --set gcc_override_configure=--disable-multilib --set gcc_override_configure=--with-cpu=cortex-m4 --set gcc_override_configure=--with-mode=thumb --set gcc_override_configure=--with-float=hard:
> -8
> # build_abe newlib:
> -6
> # build_abe stage2 -- --set gcc_override_configure=--disable-libsanitizer --set gcc_override_configure=--disable-multilib --set gcc_override_configure=--with-cpu=cortex-m4 --set gcc_override_configure=--with-mode=thumb --set gcc_override_configure=--with-float=hard:
> -5
> # benchmark -- -Os_mthumb artifacts/build-4d3605c8ca92bcde848581a8ec031827c798501b/results_id:
> 1
>
> from
> # reset_artifacts:
> -10
> # build_abe binutils:
> -9
> # build_abe stage1 -- --set gcc_override_configure=--disable-libsanitizer --set gcc_override_configure=--disable-multilib --set gcc_override_configure=--with-cpu=cortex-m4 --set gcc_override_configure=--with-mode=thumb --set gcc_override_configure=--with-float=hard:
> -8
> # build_abe newlib:
> -6
> # build_abe stage2 -- --set gcc_override_configure=--disable-libsanitizer --set gcc_override_configure=--disable-multilib --set gcc_override_configure=--with-cpu=cortex-m4 --set gcc_override_configure=--with-mode=thumb --set gcc_override_configure=--with-float=hard:
> -5
> # benchmark -- -Os_mthumb artifacts/build-baseline/results_id:
> 1
>
> THIS IS THE END OF INTERESTING STUFF. BELOW ARE LINKS TO BUILDS, REPRODUCTION INSTRUCTIONS, AND THE RAW COMMIT.
>
> This commit has regressed these CI configurations:
> - tcwg_bmk_gnu_eabi_stm32/gnu_eabi-master-arm_eabi-coremark-Os
>
> First_bad build: https://ci.linaro.org/job/tcwg_bmk_ci_gnu_eabi-bisect-tcwg_bmk_stm32-gnu_eabi-master-arm_eabi-coremark-Os/15/artifact/artifacts/build-4d3605c8ca92bcde848581a8ec031827c798501b/
> Last_good build: https://ci.linaro.org/job/tcwg_bmk_ci_gnu_eabi-bisect-tcwg_bmk_stm32-gnu_eabi-master-arm_eabi-coremark-Os/15/artifact/artifacts/build-161e87d12167b1e36193385485c1f6ce92f74f02/
> Baseline build: https://ci.linaro.org/job/tcwg_bmk_ci_gnu_eabi-bisect-tcwg_bmk_stm32-gnu_eabi-master-arm_eabi-coremark-Os/15/artifact/artifacts/build-baseline/
> Even more details: https://ci.linaro.org/job/tcwg_bmk_ci_gnu_eabi-bisect-tcwg_bmk_stm32-gnu_eabi-master-arm_eabi-coremark-Os/15/artifact/artifacts/
>
> Reproduce builds:
> <cut>
> mkdir investigate-binutils-4d3605c8ca92bcde848581a8ec031827c798501b
> cd investigate-binutils-4d3605c8ca92bcde848581a8ec031827c798501b
>
> # Fetch scripts
> git clone https://git.linaro.org/toolchain/jenkins-scripts
>
> # Fetch manifests and test.sh script
> mkdir -p artifacts/manifests
> curl -o artifacts/manifests/build-baseline.sh https://ci.linaro.org/job/tcwg_bmk_ci_gnu_eabi-bisect-tcwg_bmk_stm32-gnu_eabi-master-arm_eabi-coremark-Os/15/artifact/artifacts/manifests/build-baseline.sh --fail
> curl -o artifacts/manifests/build-parameters.sh https://ci.linaro.org/job/tcwg_bmk_ci_gnu_eabi-bisect-tcwg_bmk_stm32-gnu_eabi-master-arm_eabi-coremark-Os/15/artifact/artifacts/manifests/build-parameters.sh --fail
> curl -o artifacts/test.sh https://ci.linaro.org/job/tcwg_bmk_ci_gnu_eabi-bisect-tcwg_bmk_stm32-gnu_eabi-master-arm_eabi-coremark-Os/15/artifact/artifacts/test.sh --fail
> chmod +x artifacts/test.sh
>
> # Reproduce the baseline build (build all pre-requisites)
> ./jenkins-scripts/tcwg_bmk-build.sh @@ artifacts/manifests/build-baseline.sh
>
> # Save baseline build state (which is then restored in artifacts/test.sh)
> mkdir -p ./bisect
> rsync -a --del --delete-excluded --exclude /bisect/ --exclude /artifacts/ --exclude /binutils/ ./ ./bisect/baseline/
>
> cd binutils
>
> # Reproduce first_bad build
> git checkout --detach 4d3605c8ca92bcde848581a8ec031827c798501b
> ../artifacts/test.sh
>
> # Reproduce last_good build
> git checkout --detach 161e87d12167b1e36193385485c1f6ce92f74f02
> ../artifacts/test.sh
>
> cd ..
> </cut>
>
> Full commit (up to 1000 lines):
> <cut>
> commit 4d3605c8ca92bcde848581a8ec031827c798501b
> Author: Nikita Popov <npv1310@gmail.com>
> Date: Wed Dec 15 17:49:06 2021 +0000
>
> Fix an undefined behaviour in the BFD library's DWARF parser.
>
> PR 28687
> * dwarf1.c (parse_die): Fix undefined behaviour in range tests.
> ---
> bfd/ChangeLog | 5 +++++
> bfd/dwarf1.c | 6 ++----
> 2 files changed, 7 insertions(+), 4 deletions(-)
>
> diff --git a/bfd/ChangeLog b/bfd/ChangeLog
> index 35b659b4ef9..24311710088 100644
> --- a/bfd/ChangeLog
> +++ b/bfd/ChangeLog
> @@ -1,3 +1,8 @@
> +2021-12-15 Nikita Popov <npv1310@gmail.com>
> +
> + PR 28687
> + * dwarf1.c (parse_die): Fix undefined behaviour in range tests.
> +
> 2021-11-17 Nick Clifton <nickc@redhat.com>
>
> PR 28452
> diff --git a/bfd/dwarf1.c b/bfd/dwarf1.c
> index f1c4e7ec48c..9f4665501b4 100644
> --- a/bfd/dwarf1.c
> +++ b/bfd/dwarf1.c
> @@ -258,8 +258,7 @@ parse_die (bfd * abfd,
> if (xptr + 2 <= aDiePtrEnd)
> {
> block_len = bfd_get_16 (abfd, xptr);
> - if (xptr + block_len > aDiePtrEnd
> - || xptr + block_len < xptr)
> + if ((unsigned int) (aDiePtrEnd - xptr) < block_len)
> return false;
> xptr += block_len;
> }
> @@ -269,8 +268,7 @@ parse_die (bfd * abfd,
> if (xptr + 4 <= aDiePtrEnd)
> {
> block_len = bfd_get_32 (abfd, xptr);
> - if (xptr + block_len > aDiePtrEnd
> - || xptr + block_len < xptr)
> + if ((unsigned int) (aDiePtrEnd - xptr) < block_len)
> return false;
> xptr += block_len;
> }
> </cut>
prev parent reply other threads:[~2021-12-21 14:20 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-19 19:21 ci_notify
2021-12-21 14:20 ` Maxim Kuvyrkov [this message]
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=7DA11ADD-CF85-4060-9024-D89C8085C401@linaro.org \
--to=maxim.kuvyrkov@linaro.org \
--cc=gcc-regression@gcc.gnu.org \
--cc=npv1310@gmail.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 read-only IMAP folder(s) and NNTP newsgroup(s).