Bug 1724078

Summary: [abrt] binutils-hppa64-linux-gnu: bfd_alloc(): hppa64-linux-gnu-ld killed by SIGSEGV
Product: [Fedora] Fedora Reporter: Yann Droneaud <yann>
Component: cross-binutilsAssignee: David Howells <dhowells>
Status: CLOSED EOL QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 30CC: dan, dhowells, lkundrak
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
URL: https://retrace.fedoraproject.org/faf/reports/bthash/aa631eff875c12c0901df03c99ed13dad7fed5a0
Whiteboard: abrt_hash:39c24fec6ba275ef8dc39f8d642352ae94cd9842;VARIANT_ID=workstation;
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-05-26 15:55:22 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
File: backtrace
none
File: cgroup
none
File: core_backtrace
none
File: cpuinfo
none
File: dso_list
none
File: environ
none
File: exploitable
none
File: limits
none
File: maps
none
File: mountinfo
none
File: open_fds
none
File: proc_pid_status
none
configure's config.log none

Description Yann Droneaud 2019-06-26 08:20:47 UTC
Description of problem:
Cross building glibc for HP-PA / PA-RISC with ../configure --prefix=/usr --host=hppa64-linux-gnu  --with-headers=.../sysroot/usr/include

Version-Release number of selected component:
binutils-hppa64-linux-gnu-2.31.1-3.fc30

Additional info:
reporter:       libreport-2.10.0
backtrace_rating: 4
cmdline:        /usr/bin/hppa64-linux-gnu-ld -plugin /usr/libexec/gcc/hppa64-linux-gnu/9/liblto_plugin.so -plugin-opt=/usr/libexec/gcc/hppa64-linux-gnu/9/lto-wrapper -plugin-opt=-fresolution=/tmp/cc6njN17.res --sysroot=/usr/hppa64-linux-gnu/sys-root --build-id --no-add-needed --eh-frame-hdr --hash-style=gnu -shared -o conftest -L/usr/lib/gcc/hppa64-linux-gnu/9 /tmp/ccsjCEr9.o
crash_function: bfd_alloc
executable:     /usr/bin/hppa64-linux-gnu-ld
journald_cursor: s=0ad708db167d4a789ed83375c950b7cb;i=46af4;b=a078737d5ef94086afd59f769b8ded35;m=3e3b0299a6;t=58c358fbf4a90;x=d4d9fab88746f27e
kernel:         5.1.9-300.fc30.x86_64
rootdir:        /
runlevel:       N 5
type:           CCpp
uid:            1000

Truncated backtrace:
Thread no. 1 (8 frames)
 #0 bfd_alloc at ../../binutils-2.31.1/bfd/opncls.c:949
 #1 bfd_elf_link_record_local_dynamic_symbol at ../../binutils-2.31.1/bfd/elflink.c:770
 #2 allocate_global_data_dlt at ../../binutils-2.31.1/bfd/elf64-hppa.c:977
 #4 bfd_link_hash_traverse at ../../binutils-2.31.1/bfd/linker.c:656
 #5 elf64_hppa_size_dynamic_sections at ../../binutils-2.31.1/bfd/elf64-hppa.c:1705
 #6 bfd_elf_size_dynamic_sections at ../../binutils-2.31.1/bfd/elflink.c:6936
 #7 gldhppa64linux_before_allocation at ehppa64linux.c:1617
 #8 lang_process at ../../binutils-2.31.1/ld/ldlang.c:7373

Comment 1 Yann Droneaud 2019-06-26 08:20:51 UTC
Created attachment 1584672 [details]
File: backtrace

Comment 2 Yann Droneaud 2019-06-26 08:20:52 UTC
Created attachment 1584673 [details]
File: cgroup

Comment 3 Yann Droneaud 2019-06-26 08:20:54 UTC
Created attachment 1584674 [details]
File: core_backtrace

Comment 4 Yann Droneaud 2019-06-26 08:20:56 UTC
Created attachment 1584675 [details]
File: cpuinfo

Comment 5 Yann Droneaud 2019-06-26 08:20:57 UTC
Created attachment 1584676 [details]
File: dso_list

Comment 6 Yann Droneaud 2019-06-26 08:20:59 UTC
Created attachment 1584677 [details]
File: environ

Comment 7 Yann Droneaud 2019-06-26 08:21:01 UTC
Created attachment 1584678 [details]
File: exploitable

Comment 8 Yann Droneaud 2019-06-26 08:21:02 UTC
Created attachment 1584679 [details]
File: limits

Comment 9 Yann Droneaud 2019-06-26 08:21:03 UTC
Created attachment 1584680 [details]
File: maps

Comment 10 Yann Droneaud 2019-06-26 08:21:04 UTC
Created attachment 1584681 [details]
File: mountinfo

Comment 11 Yann Droneaud 2019-06-26 08:21:06 UTC
Created attachment 1584682 [details]
File: open_fds

Comment 12 Yann Droneaud 2019-06-26 08:21:07 UTC
Created attachment 1584683 [details]
File: proc_pid_status

Comment 13 Yann Droneaud 2019-06-26 08:24:32 UTC
Created attachment 1584697 [details]
configure's config.log

Comment 14 Yann Droneaud 2019-06-26 08:26:02 UTC
(In reply to Yann Droneaud from comment #13)
> Created attachment 1584697 [details]
> configure's config.log

Relevent config.log extract is:

configure:6605: checking whether the linker provides working __ehdr_start
configure:6628: hppa64-linux-gnu-gcc -o conftest -g -O2 -fPIC   -nostdlib -nostartfiles -shared -fno-stack-protector conftest.c  >&5
collect2: fatal error: ld terminated with signal 11 [Segmentation fault], core dumped
compilation terminated.
configure:6628: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "GNU C Library"
| #define PACKAGE_TARNAME "glibc"
| #define PACKAGE_VERSION "(see version.h)"
| #define PACKAGE_STRING "GNU C Library (see version.h)"
| #define PACKAGE_BUGREPORT "https://sourceware.org/bugzilla/"
| #define PACKAGE_URL "http://www.gnu.org/software/glibc/"
| #define PKGVERSION "(GNU libc) "
| #define REPORT_BUGS_TO "<http://www.gnu.org/software/libc/bugs.html>"
| #define HAVE_TUNABLES 1
| #define STACK_PROTECTOR_LEVEL 0
| #define HAVE_ASM_SET_DIRECTIVE 1
| #define HAVE_SDATA_SECTION 1
| #define NO_CTORS_DTORS_SECTIONS 1
| #define HAVE_Z_COMBRELOC 1
| #define HAVE_CC_INHIBIT_LOOP_TO_LIBCALL 1
| /* end confdefs.h.  */
| 
| typedef struct {
|   char foo;
|   long val;
| } Ehdr;
| extern const Ehdr __ehdr_start __attribute__ ((visibility ("hidden")));
| long ehdr (void) { return __ehdr_start.val; }
| 
configure:6644: result: no

Comment 15 Yann Droneaud 2019-06-26 09:04:40 UTC
valgrind reports:

==2162== Invalid read of size 8
==2162==    at 0x15FC92: bfd_alloc (opncls.c:949)
==2162==    by 0x189F2C: bfd_elf_link_record_local_dynamic_symbol (elflink.c:770)
==2162==    by 0x16C7DB: allocate_global_data_dlt (elf64-hppa.c:977)
==2162==    by 0x16C7DB: allocate_global_data_dlt (elf64-hppa.c:961)
==2162==    by 0x15C119: bfd_link_hash_traverse (linker.c:656)
==2162==    by 0x169906: elf64_hppa_size_dynamic_sections (elf64-hppa.c:1705)
==2162==    by 0x18F384: bfd_elf_size_dynamic_sections (elflink.c:6943)
==2162==    by 0x14F0B2: gldhppa64linux_before_allocation (ehppa64linux.c:1617)
==2162==    by 0x14127E: lang_process (ldlang.c:7373)
==2162==    by 0x12E5CD: main (ldmain.c:438)
==2162==  Address 0x108 is not stack'd, malloc'd or (recently) free'd

Comment 16 Ben Cotton 2020-04-30 21:41:21 UTC
This message is a reminder that Fedora 30 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 30 on 2020-05-26.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
Fedora 'version' of '30'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 30 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 17 Ben Cotton 2020-05-26 15:55:22 UTC
Fedora 30 changed to end-of-life (EOL) status on 2020-05-26. Fedora 30 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.