[binutils-gdb] Fix assertion failure in the BFD library when called to parse a file containing corrupt ELF group information.

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

[binutils-gdb] Fix assertion failure in the BFD library when called to parse a file containing corrupt ELF group information.

Sourceware - gdb-testers mailing list
*** TEST RESULTS FOR COMMIT 6a541707f341275fa5081ec36cc6f2551042c21e ***

commit 6a541707f341275fa5081ec36cc6f2551042c21e
Author:     Nick Clifton <[hidden email]>
AuthorDate: Thu Mar 19 14:40:00 2020 +0000
Commit:     Nick Clifton <[hidden email]>
CommitDate: Thu Mar 19 14:40:00 2020 +0000

    Fix assertion failure in the BFD library when called to parse a file containing corrupt ELF group information.
   
            PR 25699
            * elf.c (bfd_elf_set_group_contents): Replace assertion with an
            error return.

diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 44b18d87f9..1c2e1c789f 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,9 @@
+2020-03-19  Nick Clifton  <[hidden email]>
+
+ PR 25699
+ * elf.c (bfd_elf_set_group_contents): Replace assertion with an
+ error return.
+
 2020-03-19  Sebastian Huber  <[hidden email]>
 
  * elfxx-riscv.c (riscv_parse_subset): Don't use C99.
diff --git a/bfd/elf.c b/bfd/elf.c
index d182387ed4..6cbc389999 100644
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -3533,8 +3533,13 @@ bfd_elf_set_group_contents (bfd *abfd, asection *sec, void *failedptrarg)
       if (symindx == 0)
  {
   /* If called from the assembler, swap_out_syms will have set up
-     elf_section_syms.  */
-  BFD_ASSERT (elf_section_syms (abfd) != NULL);
+     elf_section_syms.
+     PR 25699: A corrupt input file could contain bogus group info.  */
+  if (elf_section_syms (abfd) == NULL)
+    {
+      *failedptr = TRUE;
+      return;
+    }
   symindx = elf_section_syms (abfd)[sec->index]->udata.i;
  }
       elf_section_data (sec)->this_hdr.sh_info = symindx;
Reply | Threaded
Open this post in threaded view
|

Failures on Fedora-x86_64-cc-with-index, branch master

Sourceware - gdb-testers mailing list
Buildername:
        Fedora-x86_64-cc-with-index

Worker:
        fedora-x86-64-2

Full Build URL:
        https://gdb-buildbot.osci.io/#builders/20/builds/2555

Author:
        Nick Clifton <[hidden email]>

Commit tested:
        6a541707f341275fa5081ec36cc6f2551042c21e

Subject of commit:
        Fix assertion failure in the BFD library when called to parse a file containing corrupt ELF group information.

Testsuite logs (gdb.sum, gdb.log and others):
        https://gdb-buildbot.osci.io/results/Fedora-x86_64-cc-with-index/6a/6a541707f341275fa5081ec36cc6f2551042c21e/

*** Diff to previous build ***
==============================================
PASS -> KFAIL: gdb.threads/omp-par-scope.exp: multi_scope: second thread: print i02
PASS -> KFAIL: gdb.threads/omp-par-scope.exp: multi_scope: second thread: print i12
PASS -> KFAIL: gdb.threads/omp-par-scope.exp: multi_scope: second thread: print i22
PASS -> KFAIL: gdb.threads/omp-par-scope.exp: nested_func: 1st call: 2nd thread: print k
PASS -> KFAIL: gdb.threads/omp-par-scope.exp: nested_func: 1st call: 2nd thread: print r
PASS -> KFAIL: gdb.threads/omp-par-scope.exp: nested_func: 1st call: 2nd thread: print z
PASS -> KFAIL: gdb.threads/omp-par-scope.exp: nested_func: 2nd call: 2nd thread: print k
PASS -> KFAIL: gdb.threads/omp-par-scope.exp: nested_func: 2nd call: 2nd thread: print r
PASS -> KFAIL: gdb.threads/omp-par-scope.exp: nested_func: 2nd call: 2nd thread: print z
PASS -> KFAIL: gdb.threads/omp-par-scope.exp: nested_parallel: inner_threads: 3rd stop: print i
PASS -> KFAIL: gdb.threads/omp-par-scope.exp: nested_parallel: inner_threads: 3rd stop: print j
PASS -> KFAIL: gdb.threads/omp-par-scope.exp: nested_parallel: outer_threads: outer stop: print i
PASS -> KFAIL: gdb.threads/omp-par-scope.exp: nested_parallel: outer_threads: outer stop: print j
PASS -> KFAIL: gdb.threads/omp-par-scope.exp: single_scope: second thread: print i3
PASS -> KFAIL: gdb.threads/process-dies-while-handling-bp.exp: non_stop=on: cond_bp_target=1: inferior 1 exited
==============================================

*** Complete list of XFAILs for this builder ***

To obtain the list of XFAIL tests for this builder, go to:

        <https://gdb-buildbot.osci.io/results/Fedora-x86_64-cc-with-index/6a/6a541707f341275fa5081ec36cc6f2551042c21e//xfail.gz>

You can also see a pretty-printed version of the list, with more information
about each XFAIL, by going to:

        <https://gdb-buildbot.osci.io/results/Fedora-x86_64-cc-with-index/6a/6a541707f341275fa5081ec36cc6f2551042c21e//xfail.table.gz>

Reply | Threaded
Open this post in threaded view
|

Failures on Fedora-x86_64-m64, branch master

Sourceware - gdb-testers mailing list
In reply to this post by Sourceware - gdb-testers mailing list
Buildername:
        Fedora-x86_64-m64

Worker:
        fedora-x86-64-2

Full Build URL:
        https://gdb-buildbot.osci.io/#builders/3/builds/2665

Author:
        Nick Clifton <[hidden email]>

Commit tested:
        6a541707f341275fa5081ec36cc6f2551042c21e

Subject of commit:
        Fix assertion failure in the BFD library when called to parse a file containing corrupt ELF group information.

Testsuite logs (gdb.sum, gdb.log and others):
        https://gdb-buildbot.osci.io/results/Fedora-x86_64-m64/6a/6a541707f341275fa5081ec36cc6f2551042c21e/

*** Diff to previous build ***
==============================================
PASS -> UNRESOLVED: gdb.base/reread.exp: opts= "" "" : second pass: breakpoint foo in first file
PASS -> UNRESOLVED: gdb.base/reread.exp: opts= "-fPIE" "ldflags=-pie" : second pass: breakpoint foo in first file
PASS -> FAIL: gdb.threads/gcore-stale-thread.exp: save a corefile
PASS -> KFAIL: gdb.threads/omp-par-scope.exp: multi_scope: first thread: print i02
PASS -> KFAIL: gdb.threads/omp-par-scope.exp: multi_scope: first thread: print i12
PASS -> KFAIL: gdb.threads/omp-par-scope.exp: multi_scope: first thread: print i22
PASS -> KFAIL: gdb.threads/omp-par-scope.exp: nested_func: 1st call: 1st thread: print k
PASS -> KFAIL: gdb.threads/omp-par-scope.exp: nested_func: 1st call: 1st thread: print r
PASS -> KFAIL: gdb.threads/omp-par-scope.exp: nested_func: 1st call: 1st thread: print z
PASS -> KFAIL: gdb.threads/omp-par-scope.exp: nested_parallel: inner_threads: 2nd stop: print i
PASS -> KFAIL: gdb.threads/omp-par-scope.exp: nested_parallel: inner_threads: 2nd stop: print j
PASS -> KFAIL: gdb.threads/omp-par-scope.exp: nested_parallel: outer_threads: outer stop: print i
PASS -> KFAIL: gdb.threads/omp-par-scope.exp: nested_parallel: outer_threads: outer stop: print j
PASS -> KFAIL: gdb.threads/process-dies-while-handling-bp.exp: non_stop=on: cond_bp_target=0: inferior 1 exited
==============================================

*** Complete list of XFAILs for this builder ***

To obtain the list of XFAIL tests for this builder, go to:

        <https://gdb-buildbot.osci.io/results/Fedora-x86_64-m64/6a/6a541707f341275fa5081ec36cc6f2551042c21e//xfail.gz>

You can also see a pretty-printed version of the list, with more information
about each XFAIL, by going to:

        <https://gdb-buildbot.osci.io/results/Fedora-x86_64-m64/6a/6a541707f341275fa5081ec36cc6f2551042c21e//xfail.table.gz>

Reply | Threaded
Open this post in threaded view
|

Failures on Fedora-x86_64-native-extended-gdbserver-m32, branch master

Sourceware - gdb-testers mailing list
In reply to this post by Sourceware - gdb-testers mailing list
Buildername:
        Fedora-x86_64-native-extended-gdbserver-m32

Worker:
        fedora-x86-64-4

Full Build URL:
        https://gdb-buildbot.osci.io/#builders/4/builds/2501

Author:
        Nick Clifton <[hidden email]>

Commit tested:
        6a541707f341275fa5081ec36cc6f2551042c21e

Subject of commit:
        Fix assertion failure in the BFD library when called to parse a file containing corrupt ELF group information.

Testsuite logs (gdb.sum, gdb.log and others):
        https://gdb-buildbot.osci.io/results/Fedora-x86_64-native-extended-gdbserver-m32/6a/6a541707f341275fa5081ec36cc6f2551042c21e/

*** Diff to previous build ***
==============================================
new FAIL: gdb.base/coredump-filter.exp: disassembling function main for non-Private-Anonymous: no binary: loading /home/gdb-buildbot-2/fedora-x86-64-4/fedora-x86-64-native-extended-gdbserver-m32/build/gdb/testsuite/outputs/gdb.base/coredump-filter/non-private-anon.gcore
new FAIL: gdb.base/coredump-filter.exp: disassembling function main for non-Shared-Anonymous: no binary: loading /home/gdb-buildbot-2/fedora-x86-64-4/fedora-x86-64-native-extended-gdbserver-m32/build/gdb/testsuite/outputs/gdb.base/coredump-filter/non-shared-anon.gcore
new FAIL: gdb.base/coredump-filter.exp: loading and testing corefile for DoNotDump: loading /home/gdb-buildbot-2/fedora-x86-64-4/fedora-x86-64-native-extended-gdbserver-m32/build/gdb/testsuite/outputs/gdb.base/coredump-filter/dont-dump.gcore
new FAIL: gdb.base/coredump-filter.exp: loading and testing corefile for non-Shared-Anonymous: loading /home/gdb-buildbot-2/fedora-x86-64-4/fedora-x86-64-native-extended-gdbserver-m32/build/gdb/testsuite/outputs/gdb.base/coredump-filter/non-shared-anon.gcore
UNRESOLVED -> FAIL: gdb.mi/mi-exec-run.exp: inferior-tty=main: mi=main: force-fail=1: run failure detected
UNRESOLVED -> FAIL: gdb.mi/mi-exec-run.exp: inferior-tty=main: mi=separate: force-fail=1: run failure detected
UNRESOLVED -> FAIL: gdb.mi/mi-exec-run.exp: inferior-tty=separate: mi=main: force-fail=1: run failure detected
UNRESOLVED -> FAIL: gdb.mi/mi-exec-run.exp: inferior-tty=separate: mi=separate: force-fail=1: run failure detected
PASS -> FAIL: gdb.multi/multi-re-run.exp: re_run_inf=2: iter=2: continue until exit
PASS -> FAIL: gdb.multi/multi-re-run.exp: re_run_inf=2: iter=2: print re_run_var_2
FAIL -> UNRESOLVED: gdb.threads/fork-plus-threads.exp: detach-on-fork=off: inferior 1 exited
PASS -> KFAIL: gdb.threads/process-dies-while-handling-bp.exp: non_stop=on: cond_bp_target=1: inferior 1 exited
==============================================

*** Complete list of XFAILs for this builder ***

To obtain the list of XFAIL tests for this builder, go to:

        <https://gdb-buildbot.osci.io/results/Fedora-x86_64-native-extended-gdbserver-m32/6a/6a541707f341275fa5081ec36cc6f2551042c21e//xfail.gz>

You can also see a pretty-printed version of the list, with more information
about each XFAIL, by going to:

        <https://gdb-buildbot.osci.io/results/Fedora-x86_64-native-extended-gdbserver-m32/6a/6a541707f341275fa5081ec36cc6f2551042c21e//xfail.table.gz>

Reply | Threaded
Open this post in threaded view
|

Failures on Fedora-x86_64-native-extended-gdbserver-m64, branch master

Sourceware - gdb-testers mailing list
In reply to this post by Sourceware - gdb-testers mailing list
Buildername:
        Fedora-x86_64-native-extended-gdbserver-m64

Worker:
        fedora-x86-64-2

Full Build URL:
        https://gdb-buildbot.osci.io/#builders/2/builds/2502

Author:
        Nick Clifton <[hidden email]>

Commit tested:
        6a541707f341275fa5081ec36cc6f2551042c21e

Subject of commit:
        Fix assertion failure in the BFD library when called to parse a file containing corrupt ELF group information.

Testsuite logs (gdb.sum, gdb.log and others):
        https://gdb-buildbot.osci.io/results/Fedora-x86_64-native-extended-gdbserver-m64/6a/6a541707f341275fa5081ec36cc6f2551042c21e/

*** Diff to previous build ***
==============================================
new FAIL: gdb.base/break-interp.exp: ldprelink=NO: ldsepdebug=IN: binprelink=NO: binsepdebug=NO: binpie=NO: INNER: symbol-less: entry point reached
new FAIL: gdb.base/break-interp.exp: ldprelink=NO: ldsepdebug=IN: binprelink=NO: binsepdebug=NO: binpie=YES: INNER: symbol-less: entry point reached
PASS -> UNRESOLVED: gdb.base/reread.exp: opts= "" "" : second pass: breakpoint foo in first file
PASS -> UNRESOLVED: gdb.base/reread.exp: opts= "-fPIE" "ldflags=-pie" : second pass: breakpoint foo in first file
FAIL -> UNRESOLVED: gdb.mi/mi-exec-run.exp: inferior-tty=main: mi=main: force-fail=1: run failure detected
FAIL -> UNRESOLVED: gdb.mi/mi-exec-run.exp: inferior-tty=main: mi=separate: force-fail=1: run failure detected
FAIL -> UNRESOLVED: gdb.mi/mi-exec-run.exp: inferior-tty=separate: mi=main: force-fail=1: run failure detected
FAIL -> UNRESOLVED: gdb.mi/mi-exec-run.exp: inferior-tty=separate: mi=separate: force-fail=1: run failure detected
PASS -> KFAIL: gdb.threads/omp-par-scope.exp: multi_scope: second thread: print i02
PASS -> KFAIL: gdb.threads/omp-par-scope.exp: multi_scope: second thread: print i12
PASS -> KFAIL: gdb.threads/omp-par-scope.exp: multi_scope: second thread: print i22
PASS -> KFAIL: gdb.threads/omp-par-scope.exp: nested_parallel: inner_threads: 1st stop: print i
PASS -> KFAIL: gdb.threads/omp-par-scope.exp: nested_parallel: inner_threads: 1st stop: print j
new KFAIL: gdb.threads/watchthreads2.exp: gdb can drop watchpoints in multithreaded app
==============================================

*** Complete list of XFAILs for this builder ***

To obtain the list of XFAIL tests for this builder, go to:

        <https://gdb-buildbot.osci.io/results/Fedora-x86_64-native-extended-gdbserver-m64/6a/6a541707f341275fa5081ec36cc6f2551042c21e//xfail.gz>

You can also see a pretty-printed version of the list, with more information
about each XFAIL, by going to:

        <https://gdb-buildbot.osci.io/results/Fedora-x86_64-native-extended-gdbserver-m64/6a/6a541707f341275fa5081ec36cc6f2551042c21e//xfail.table.gz>

Reply | Threaded
Open this post in threaded view
|

Failures on Fedora-x86_64-native-gdbserver-m32, branch master

Sourceware - gdb-testers mailing list
In reply to this post by Sourceware - gdb-testers mailing list
Buildername:
        Fedora-x86_64-native-gdbserver-m32

Worker:
        fedora-x86-64-3

Full Build URL:
        https://gdb-buildbot.osci.io/#builders/24/builds/2503

Author:
        Nick Clifton <[hidden email]>

Commit tested:
        6a541707f341275fa5081ec36cc6f2551042c21e

Subject of commit:
        Fix assertion failure in the BFD library when called to parse a file containing corrupt ELF group information.

Testsuite logs (gdb.sum, gdb.log and others):
        https://gdb-buildbot.osci.io/results/Fedora-x86_64-native-gdbserver-m32/6a/6a541707f341275fa5081ec36cc6f2551042c21e/

*** Diff to previous build ***
==============================================
PASS -> FAIL: gdb.base/signals-state-child.exp: signals states are identical
==============================================

*** Complete list of XFAILs for this builder ***

To obtain the list of XFAIL tests for this builder, go to:

        <https://gdb-buildbot.osci.io/results/Fedora-x86_64-native-gdbserver-m32/6a/6a541707f341275fa5081ec36cc6f2551042c21e//xfail.gz>

You can also see a pretty-printed version of the list, with more information
about each XFAIL, by going to:

        <https://gdb-buildbot.osci.io/results/Fedora-x86_64-native-gdbserver-m32/6a/6a541707f341275fa5081ec36cc6f2551042c21e//xfail.table.gz>

Reply | Threaded
Open this post in threaded view
|

Failures on Fedora-x86_64-native-gdbserver-m64, branch master

Sourceware - gdb-testers mailing list
In reply to this post by Sourceware - gdb-testers mailing list
Buildername:
        Fedora-x86_64-native-gdbserver-m64

Worker:
        fedora-x86-64-1

Full Build URL:
        https://gdb-buildbot.osci.io/#builders/22/builds/2501

Author:
        Nick Clifton <[hidden email]>

Commit tested:
        6a541707f341275fa5081ec36cc6f2551042c21e

Subject of commit:
        Fix assertion failure in the BFD library when called to parse a file containing corrupt ELF group information.

Testsuite logs (gdb.sum, gdb.log and others):
        https://gdb-buildbot.osci.io/results/Fedora-x86_64-native-gdbserver-m64/6a/6a541707f341275fa5081ec36cc6f2551042c21e/

*** Diff to previous build ***
==============================================
PASS -> FAIL: gdb.base/options.exp: test-print: cmd complete "thread apply 1 frame apply 1 print -"
PASS -> FAIL: gdb.base/options.exp: test-print: tab complete "thread apply 1 frame apply 1 print -"
PASS -> FAIL: gdb.linespec/cpcompletion.exp: in-source-file-unconstrained: cmd complete "b file_constrained_test"
PASS -> FAIL: gdb.linespec/cpcompletion.exp: in-source-file-unconstrained: tab complete "b file_constrained_test"
PASS -> FAIL: gdb.linespec/cpls-ops.exp: operator[]-unique: cmd complete "b -function test_unique_op_array::operator"
PASS -> FAIL: gdb.linespec/cpls-ops.exp: operator[]-unique: tab complete "b -function test_unique_op_array::operator"
PASS -> FAIL: gdb.threads/interrupted-hand-call.exp: continue until exit
PASS -> KFAIL: gdb.threads/omp-par-scope.exp: nested_func: 2nd call: 2nd thread: print k
PASS -> KFAIL: gdb.threads/omp-par-scope.exp: nested_func: 2nd call: 2nd thread: print r
PASS -> KFAIL: gdb.threads/omp-par-scope.exp: nested_func: 2nd call: 2nd thread: print z
PASS -> KFAIL: gdb.threads/omp-par-scope.exp: nested_parallel: outer_threads: outer stop: print i
PASS -> KFAIL: gdb.threads/omp-par-scope.exp: nested_parallel: outer_threads: outer stop: print j
PASS -> KFAIL: gdb.threads/process-dies-while-handling-bp.exp: non_stop=on: cond_bp_target=1: inferior 1 exited
==============================================

*** Complete list of XFAILs for this builder ***

To obtain the list of XFAIL tests for this builder, go to:

        <https://gdb-buildbot.osci.io/results/Fedora-x86_64-native-gdbserver-m64/6a/6a541707f341275fa5081ec36cc6f2551042c21e//xfail.gz>

You can also see a pretty-printed version of the list, with more information
about each XFAIL, by going to:

        <https://gdb-buildbot.osci.io/results/Fedora-x86_64-native-gdbserver-m64/6a/6a541707f341275fa5081ec36cc6f2551042c21e//xfail.table.gz>

Reply | Threaded
Open this post in threaded view
|

Failures on Ubuntu-Aarch64-native-extended-gdbserver-m64, branch master

Sourceware - gdb-testers mailing list
In reply to this post by Sourceware - gdb-testers mailing list
Buildername:
        Ubuntu-Aarch64-native-extended-gdbserver-m64

Worker:
        ubuntu-aarch64

Full Build URL:
        https://gdb-buildbot.osci.io/#builders/5/builds/2385

Author:
        Nick Clifton <[hidden email]>

Commit tested:
        6a541707f341275fa5081ec36cc6f2551042c21e

Subject of commit:
        Fix assertion failure in the BFD library when called to parse a file containing corrupt ELF group information.

Testsuite logs (gdb.sum, gdb.log and others):
        https://gdb-buildbot.osci.io/results/Ubuntu-Aarch64-native-extended-gdbserver-m64/6a/6a541707f341275fa5081ec36cc6f2551042c21e/

*** Diff to previous build ***
==============================================
PASS -> FAIL: gdb.base/step-over-syscall.exp: detach-on-fork=off: follow-fork=child: break cond on target : fork: pc after stepi matches insn addr after syscall
==============================================

*** Complete list of XFAILs for this builder ***

To obtain the list of XFAIL tests for this builder, go to:

        <https://gdb-buildbot.osci.io/results/Ubuntu-Aarch64-native-extended-gdbserver-m64/6a/6a541707f341275fa5081ec36cc6f2551042c21e//xfail.gz>

You can also see a pretty-printed version of the list, with more information
about each XFAIL, by going to:

        <https://gdb-buildbot.osci.io/results/Ubuntu-Aarch64-native-extended-gdbserver-m64/6a/6a541707f341275fa5081ec36cc6f2551042c21e//xfail.table.gz>