From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-x42c.google.com (mail-wr1-x42c.google.com [IPv6:2a00:1450:4864:20::42c]) by sourceware.org (Postfix) with ESMTPS id 2B4433896C1D for ; Mon, 5 Dec 2022 09:02:53 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 2B4433896C1D Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-wr1-x42c.google.com with SMTP id y16so17547528wrm.2 for ; Mon, 05 Dec 2022 01:02:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=list-id:mime-version:subject:message-id:cc:to:date:from:from:to:cc :subject:date:message-id:reply-to; bh=z0wfOK+WnNhvIE43pUyAv8YS3lzRcESDj4NgmBuL+9M=; b=bYRQFQFz1QbxCnv5+xlpHX5yyuRIE8+xOoGh5Dh1NHetguROQEdTtbUw667VMlslOt MfvP8aF/zEHVmdU7df22EnFABkBFoyxCX9vtpq8FlZtf92jNRwyFLsBgNr/7Ph8rWAne RMYKo+1NKBsQ62v41TSCnwwNDnSx1lIQH0mTRJGEwk/2fPGYTBSgeihmKqRWsJKLw8Zr MrejjlxbteJ/hrpKDktpf3oYr5aWQavBuH9SQwXaFFKG0uFtuvsre9URFIL8SSmNr6/i S6aJ8QB+GFz+EWZYp1RNSstruHg7YBqK6AWBRptlUpgpvNSSxerFC2t3a2j6/La1XdOC wcVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=list-id:mime-version:subject:message-id:cc:to:date:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=z0wfOK+WnNhvIE43pUyAv8YS3lzRcESDj4NgmBuL+9M=; b=jiA1fEW3h4hRLQWQJWbTnnf0u59gkJKbQUUqDYMD4ZvMVrCNqUAGWcBoOvomhcDa7q 7tshWJlc+RQIGWauR9IOe2mul0dnjLkVH11YntcTpaV24xrqXOc+UJDpn+iS/zPyom1e HFFyxUi0dxsRNOQK3aMT1xau+PfPLlVLXQrIvMAvEwNTs50Ci+8J9SRdxNPJGHwWGx5D HBfvMgO8y1ZTiopnat09OWeuMfs6hJJoGqYvgCHt6vUf1IgBW0Ph1OXB9dvSRXM0Hn/V YSlSRzB5F5PGBKdvuJxuXKWvEtvFocty8DtUQ9Mpo7G95oA8XZHmWXEGJk037Vysc3r2 wFHg== X-Gm-Message-State: ANoB5pnIxsq5omtfGfW0sfo1uKmPVgT6HBjtYaxbrkrMN60FntHmc2gX yPbDFxPA7dKw9QJAh101BhIgdg== X-Google-Smtp-Source: AA0mqf7WRhJ3h6a17SRdnrHCyW/ExU0MII/v1ukIsnVgjhFRnUsT97Y749RjdzInTWWZB3E85W6jwA== X-Received: by 2002:a5d:67ca:0:b0:242:7174:c82f with SMTP id n10-20020a5d67ca000000b002427174c82fmr208308wrw.259.1670230971860; Mon, 05 Dec 2022 01:02:51 -0800 (PST) Received: from jenkins.jenkins (ci.linaro.org. [88.99.136.175]) by smtp.gmail.com with ESMTPSA id bs4-20020a056000070400b0023677081f3asm13752752wrb.42.2022.12.05.01.02.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Dec 2022 01:02:50 -0800 (PST) From: ci_notify@linaro.org X-Google-Original-From: linaro-infrastructure-errors@lists.linaro.org Date: Mon, 5 Dec 2022 09:02:50 +0000 (UTC) To: Alan Modra Cc: gcc-regression@gcc.gnu.org Message-ID: <651357241.40496.1670230970976@jenkins.jenkins> Subject: [TCWG CI] Failure after gdb-12-branchpoint-2943-g13917d936e3: Renaming .debug to .zdebug and vice versa MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_40495_800016668.1670230970419" X-Jenkins-Job: TCWG Build tcwg_gnu_cross_build/master-arm X-Jenkins-Result: SUCCESS List-ID: X-Spam-Status: No, score=-13.7 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org ------=_Part_40495_800016668.1670230970419 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Failure after gdb-12-branchpoint-2943-g13917d936e3: Renaming .debug to .zde= bug and vice versa: Results changed to -10 # true: 0 # build_abe binutils: 1 # build_abe stage1: 2 # build_abe linux: 3 # build_abe glibc: 4 # build_abe stage2: 5 # build_abe gdb: # FAILED # First few build errors in logs: # 00:02:36 ../bfd/bfd.h:7970:30: error: invalid conversion from =E2=80=98vo= id*=E2=80=99 to =E2=80=98char*=E2=80=99 [-fpermissive] # 00:02:36 ../bfd/bfd.h:7983:30: error: invalid conversion from =E2=80=98vo= id*=E2=80=99 to =E2=80=98char*=E2=80=99 [-fpermissive] # 00:02:36 make[1]: *** [Makefile:1899: bcache.o] Error 1 # 00:02:36 ../bfd/bfd.h:7970:30: error: invalid conversion from =E2=80=98vo= id*=E2=80=99 to =E2=80=98char*=E2=80=99 [-fpermissive] # 00:02:36 ../bfd/bfd.h:7983:30: error: invalid conversion from =E2=80=98vo= id*=E2=80=99 to =E2=80=98char*=E2=80=99 [-fpermissive] # 00:02:36 make[1]: *** [Makefile:1899: gdb.o] Error 1 # 00:02:37 ../bfd/bfd.h:7970:30: error: invalid conversion from =E2=80=98vo= id*=E2=80=99 to =E2=80=98char*=E2=80=99 [-fpermissive] # 00:02:37 ../bfd/bfd.h:7983:30: error: invalid conversion from =E2=80=98vo= id*=E2=80=99 to =E2=80=98char*=E2=80=99 [-fpermissive] # 00:02:37 make[1]: *** [Makefile:1899: async-event.o] Error 1 # 00:02:37 ../bfd/bfd.h:7970:30: error: invalid conversion from =E2=80=98vo= id*=E2=80=99 to =E2=80=98char*=E2=80=99 [-fpermissive] from -10 # true: 0 # build_abe binutils: 1 # build_abe stage1: 2 # build_abe linux: 3 # build_abe glibc: 4 # build_abe stage2: 5 # build_abe gdb: 6 # build_abe qemu: 7 THIS IS THE END OF INTERESTING STUFF. BELOW ARE LINKS TO BUILDS, REPRODUCT= ION INSTRUCTIONS, AND THE RAW COMMIT. For latest status see comments in https://linaro.atlassian.net/browse/GNU-6= 92 . Status of gdb-12-branchpoint-2943-g13917d936e3 commit for tcwg_gnu_cross_bu= ild: commit 13917d936e367b0c42d4c32566e1017ff8e15520 Author: Alan Modra Date: Sun Dec 4 12:29:19 2022 +1030 Renaming .debug to .zdebug and vice versa =20 Move a couple of elf.c functions to compress.c. =20 * compress.c (bfd_debug_name_to_zdebug): New inline function. (bfd_zdebug_name_to_debug): Likewise. * elf.c (convert_debug_to_zdebug, convert_zdebug_to_debug): Del= ete. (_bfd_elf_make_section_from_shdr, elf_fake_sections), (_bfd_elf_assign_file_positions_for_non_load): Adjust to suit. * coffgen.c (make_a_section_from_file): Use new inlines here. * master-arm ** Failure after gdb-12-branchpoint-2943-g13917d936e3: Renaming .debug to .= zdebug and vice versa: ** https://ci.linaro.org/job/tcwg_gnu_cross_build-build-master-arm/1942/ Bad build: https://ci.linaro.org/job/tcwg_gnu_cross_build-build-master-arm= /1942/artifact/artifacts Good build: https://ci.linaro.org/job/tcwg_gnu_cross_build-build-master-arm= /1940/artifact/artifacts Reproduce current build: mkdir -p investigate-gdb-13917d936e367b0c42d4c32566e1017ff8e15520 cd investigate-gdb-13917d936e367b0c42d4c32566e1017ff8e15520 # Fetch scripts git clone https://git.linaro.org/toolchain/jenkins-scripts # Fetch manifests for bad and good builds mkdir -p bad/artifacts good/artifacts curl -o bad/artifacts/manifest.sh https://ci.linaro.org/job/tcwg_gnu_cross_= build-build-master-arm/1942/artifact/artifacts/manifest.sh --fail curl -o good/artifacts/manifest.sh https://ci.linaro.org/job/tcwg_gnu_cross= _build-build-master-arm/1940/artifact/artifacts/manifest.sh --fail # Reproduce bad build (cd bad; ../jenkins-scripts/tcwg_gnu-build.sh ^^ true %%rr[top_artifacts] a= rtifacts) # Reproduce good build (cd good; ../jenkins-scripts/tcwg_gnu-build.sh ^^ true %%rr[top_artifacts] = artifacts) Full commit (up to 1000 lines): commit 13917d936e367b0c42d4c32566e1017ff8e15520 Author: Alan Modra Date: Sun Dec 4 12:29:19 2022 +1030 Renaming .debug to .zdebug and vice versa =20 Move a couple of elf.c functions to compress.c. =20 * compress.c (bfd_debug_name_to_zdebug): New inline function. (bfd_zdebug_name_to_debug): Likewise. * elf.c (convert_debug_to_zdebug, convert_zdebug_to_debug): Del= ete. (_bfd_elf_make_section_from_shdr, elf_fake_sections), (_bfd_elf_assign_file_positions_for_non_load): Adjust to suit. * coffgen.c (make_a_section_from_file): Use new inlines here. --- bfd/bfd-in2.h | 25 +++++++++++++++++++++++++ bfd/coffgen.c | 23 ++++++----------------- bfd/compress.c | 29 +++++++++++++++++++++++++++++ bfd/elf.c | 34 ++++------------------------------ 4 files changed, 64 insertions(+), 47 deletions(-) diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h index 0b071dda1e5..48451175364 100644 --- a/bfd/bfd-in2.h +++ b/bfd/bfd-in2.h @@ -7963,6 +7963,31 @@ bfd_byte *bfd_simple_get_relocated_section_contents (bfd *abfd, asection *sec, bfd_byte *outbuf, asymbol **symbol_table); =20 /* Extracted from compress.c. */ +static inline char * +bfd_debug_name_to_zdebug (bfd *abfd, const char *name) +{ + size_t len =3D strlen (name); + char *new_name =3D bfd_alloc (abfd, len + 2); + if (new_name =3D=3D NULL) + return NULL; + new_name[0] =3D '.'; + new_name[1] =3D 'z'; + memcpy (new_name + 2, name + 1, len); + return new_name; +} + +static inline char * +bfd_zdebug_name_to_debug (bfd *abfd, const char *name) +{ + size_t len =3D strlen (name); + char *new_name =3D bfd_alloc (abfd, len); + if (new_name =3D=3D NULL) + return NULL; + new_name[0] =3D '.'; + memcpy (new_name + 1, name + 2, len - 1); + return new_name; +} + bool bfd_get_full_section_contents (bfd *abfd, asection *section, bfd_byte **ptr); =20 diff --git a/bfd/coffgen.c b/bfd/coffgen.c index aab41c34ec7..f2c71b19880 100644 --- a/bfd/coffgen.c +++ b/bfd/coffgen.c @@ -181,19 +181,12 @@ make_a_section_from_file (bfd *abfd, =09=09 abfd, name); =09 return false; =09 } -=09 if (return_section->compress_status =3D=3D COMPRESS_SECTION_DONE) +=09 if (return_section->compress_status =3D=3D COMPRESS_SECTION_DONE +=09 && name[1] !=3D 'z') =09 { -=09 if (name[1] !=3D 'z') -=09=09{ -=09=09 unsigned int len =3D strlen (name); - -=09=09 new_name =3D bfd_alloc (abfd, len + 2); -=09=09 if (new_name =3D=3D NULL) -=09=09 return false; -=09=09 new_name[0] =3D '.'; -=09=09 new_name[1] =3D 'z'; -=09=09 memcpy (new_name + 2, name + 1, len); -=09=09} +=09 new_name =3D bfd_debug_name_to_zdebug (abfd, name); +=09 if (new_name =3D=3D NULL) +=09=09return false; =09 } =09 break; =09case decompress: @@ -207,13 +200,9 @@ make_a_section_from_file (bfd *abfd, =09 } =09 if (name[1] =3D=3D 'z') =09 { -=09 unsigned int len =3D strlen (name); - -=09 new_name =3D bfd_alloc (abfd, len); +=09 new_name =3D bfd_zdebug_name_to_debug (abfd, name); =09 if (new_name =3D=3D NULL) =09=09return false; -=09 new_name[0] =3D '.'; -=09 memcpy (new_name + 1, name + 2, len - 1); =09 } =09 break; =09} diff --git a/bfd/compress.c b/bfd/compress.c index ad3feeafc6c..95579847cf3 100644 --- a/bfd/compress.c +++ b/bfd/compress.c @@ -30,6 +30,35 @@ =20 #define MAX_COMPRESSION_HEADER_SIZE 24 =20 +/* +CODE_FRAGMENT +.static inline char * +.bfd_debug_name_to_zdebug (bfd *abfd, const char *name) +.{ +. size_t len =3D strlen (name); +. char *new_name =3D bfd_alloc (abfd, len + 2); +. if (new_name =3D=3D NULL) +. return NULL; +. new_name[0] =3D '.'; +. new_name[1] =3D 'z'; +. memcpy (new_name + 2, name + 1, len); +. return new_name; +.} +. +.static inline char * +.bfd_zdebug_name_to_debug (bfd *abfd, const char *name) +.{ +. size_t len =3D strlen (name); +. char *new_name =3D bfd_alloc (abfd, len); +. if (new_name =3D=3D NULL) +. return NULL; +. new_name[0] =3D '.'; +. memcpy (new_name + 1, name + 2, len - 1); +. return new_name; +.} +. +*/ + static bool decompress_contents (bool is_zstd, bfd_byte *compressed_buffer, =09=09 bfd_size_type compressed_size, diff --git a/bfd/elf.c b/bfd/elf.c index 87ec1623313..9e490c968c1 100644 --- a/bfd/elf.c +++ b/bfd/elf.c @@ -968,31 +968,6 @@ bfd_elf_group_name (bfd *abfd ATTRIBUTE_UNUSED, const = asection *sec) return NULL; } =20 -static char * -convert_debug_to_zdebug (bfd *abfd, const char *name) -{ - unsigned int len =3D strlen (name); - char *new_name =3D bfd_alloc (abfd, len + 2); - if (new_name =3D=3D NULL) - return NULL; - new_name[0] =3D '.'; - new_name[1] =3D 'z'; - memcpy (new_name + 2, name + 1, len); - return new_name; -} - -static char * -convert_zdebug_to_debug (bfd *abfd, const char *name) -{ - unsigned int len =3D strlen (name); - char *new_name =3D bfd_alloc (abfd, len); - if (new_name =3D=3D NULL) - return NULL; - new_name[0] =3D '.'; - memcpy (new_name + 1, name + 2, len - 1); - return new_name; -} - /* This a copy of lto_section defined in GCC (lto-streamer.h). */ =20 struct lto_section @@ -1285,7 +1260,7 @@ _bfd_elf_make_section_from_shdr (bfd *abfd, =09=09 /* Convert section name from .zdebug_* to .debug_* so =09=09 that linker will consider this section as a debug =09=09 section. */ -=09=09 char *new_name =3D convert_zdebug_to_debug (abfd, name); +=09=09 char *new_name =3D bfd_zdebug_name_to_debug (abfd, name); =09=09 if (new_name =3D=3D NULL) =09=09 return false; =09=09 bfd_rename_section (newsect, new_name); @@ -3233,7 +3208,7 @@ elf_fake_sections (bfd *abfd, asection *asect, void *= fsarg) =09 needed. */ =09 if (name[1] =3D=3D 'z') =09 { -=09 char *new_name =3D convert_zdebug_to_debug (abfd, name); +=09 char *new_name =3D bfd_zdebug_name_to_debug (abfd, name); =09 if (new_name =3D=3D NULL) =09=09{ =09=09 arg->failed =3D true; @@ -3249,7 +3224,7 @@ elf_fake_sections (bfd *abfd, asection *asect, void *= fsarg) =09 section smaller. So only rename the section when =09 compression has actually taken place. If input section =09 name is .zdebug_*, we should never compress it again. */ -=09 char *new_name =3D convert_debug_to_zdebug (abfd, name); +=09 char *new_name =3D bfd_debug_name_to_zdebug (abfd, name); =09 if (new_name =3D=3D NULL) =09 { =09 arg->failed =3D true; @@ -6729,8 +6704,7 @@ _bfd_elf_assign_file_positions_for_non_load (bfd *abf= d) =09=09 { =09=09 /* If section is compressed with zlib-gnu, convert =09=09=09 section name from .debug_* to .zdebug_*. */ -=09=09 char *new_name -=09=09=09=3D convert_debug_to_zdebug (abfd, name); +=09=09 char *new_name =3D bfd_debug_name_to_zdebug (abfd, name); =09=09 if (new_name =3D=3D NULL) =09=09=09return false; =09=09 name =3D new_name; ------=_Part_40495_800016668.1670230970419--