public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug fortran/27341] [dwarf-5] FAIL: gdb.fortran/function-calls.exp: p derived_types_and_module_calls::pass_cart_nd(c_nd)
Date: Tue, 09 Feb 2021 22:28:20 +0000	[thread overview]
Message-ID: <bug-27341-4717-eOiWOWGv1a@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-27341-4717@http.sourceware.org/bugzilla/>

https://sourceware.org/bugzilla/show_bug.cgi?id=27341

--- Comment #4 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Tom de Vries <vries@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=cf2b20752995e6f10d88afc49166e729c33beb48

commit cf2b20752995e6f10d88afc49166e729c33beb48
Author: Tom de Vries <tdevries@suse.de>
Date:   Tue Feb 9 23:28:16 2021 +0100

    [gdb/symtab] Fix element type modification in read_array_type

    When running test-case gdb.fortran/function-calls.exp with target board
    unix/gdb:debug_flags=-gdwarf-5, I run into:
    ...
    (gdb) PASS: gdb.fortran/function-calls.exp: \
      p derived_types_and_module_calls::pass_cart(c)
    p derived_types_and_module_calls::pass_cart_nd(c_nd)^M
    ^M
    Program received signal SIGSEGV, Segmentation fault.^M
    0x0000000000400f73 in derived_types_and_module_calls::pass_cart_nd \
      (c=<error reading variable: Cannot access memory at address 0xc>) at \
      function-calls.f90:130^M
    130             pass_cart_nd = ubound(c%d,1,4)^M
    The program being debugged was signaled while in a function called from
GDB.^M
    GDB has restored the context to what it was before the call.^M
    To change this behavior use "set unwindonsignal off".^M
    Evaluation of the expression containing the function^M
    (derived_types_and_module_calls::pass_cart_nd) will be abandoned.^M
    (gdb) FAIL: gdb.fortran/function-calls.exp: p
    ...

    The problem originates in read_array_type, when reading a DW_TAG_array_type
    with a dwarf-5 DW_TAG_generic_subrange child.  This is not supported, and
the
    fallout of this is that rather than constructing a new array type, the code
    proceeds to modify the element type.

    Fix this conservatively by issuing a complaint and bailing out in
    read_array_type when not being able to construct an array type, such that
we
    have:
    ...
    (gdb) maint expand-symtabs function-calls.f90^M
    During symbol reading: unable to find array range \
      - DIE at 0xe1e [in module function-calls]^M
    During symbol reading: unable to find array range \
      - DIE at 0xe1e [in module function-calls]^M
    (gdb) KFAIL: gdb.fortran/function-calls.exp: no complaints in srcfile \
      (PRMS: symtab/27388)
    ...

    Tested on x86_64-linux.

    gdb/ChangeLog:

    2021-02-09  Tom de Vries  <tdevries@suse.de>

            PR symtab/27341
            * dwarf2/read.c (read_array_type): Return NULL when not being able
to
            construct an array type.  Add assert to ensure that element_type is
            not being modified.

    gdb/testsuite/ChangeLog:

    2021-02-09  Tom de Vries  <tdevries@suse.de>

            PR symtab/27341
            * lib/gdb.exp (with_complaints): New proc, factored out of ...
            (gdb_load_no_complaints): ... here.
            * gdb.fortran/function-calls.exp: Add test-case.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

  parent reply	other threads:[~2021-02-09 22:28 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-03 22:39 [Bug fortran/27341] New: " vries at gcc dot gnu.org
2021-02-04  7:53 ` [Bug fortran/27341] " vries at gcc dot gnu.org
2021-02-04  9:48 ` vries at gcc dot gnu.org
2021-02-05 12:32 ` vries at gcc dot gnu.org
2021-02-09 22:28 ` cvs-commit at gcc dot gnu.org [this message]
2021-02-09 22:30 ` vries at gcc dot gnu.org
2021-02-09 22:31 ` vries at gcc dot gnu.org
2021-03-07 16:58 ` cvs-commit at gcc dot gnu.org
2021-03-07 16:59 ` vries at gcc dot gnu.org
2021-07-15  1:35 ` sherrixotyv29 at gmail dot com
2021-07-15  5:54 ` vries at gcc dot gnu.org
2021-07-21  4:06 ` ampva300 at gmail dot com
2021-07-21  7:21 ` vries at gcc dot gnu.org
2021-08-09  9:41 ` phillipsaeverett84 at gmail dot com
2021-08-10 11:45 ` ucelsanicin at yahoo dot com
2021-09-02 11:05 ` donipah907 at mtlcz dot com
2021-09-02 11:14 ` mark at klomp dot org
2021-09-06  9:06 ` focixujo at livinginsurance dot co.uk
2021-09-06  9:12 ` focixujo at livinginsurance dot co.uk
2021-09-10 19:40 ` mehmetgelisin at aol dot com
2021-09-22 16:40 ` mervegunesli at aol dot com
2021-09-26 13:31 ` tes.vik1986 at gmail dot com
2021-10-04  4:39 ` olivernicholle9052 at gmail dot com
2021-10-05  4:33 ` cartwrighthlmv67 at gmail dot com
2021-10-09 11:00 ` gulsenenginar at aol dot com
2021-10-10  3:40 ` cartwrighthlmv67 at gmail dot com
2021-10-10 16:11 ` oficaj3 at gmail dot com
2021-10-11 11:26 ` albertopyhy93 at gmail dot com
2021-10-18  6:45 ` pagefitzpatrick687 at gmail dot com
2021-10-18 19:57 ` ahmedsayeed1982 at hotmail dot com
2021-10-18 19:59 ` ahmedsayeed1982 at hotmail dot com
2021-10-19  7:14 ` progonsaytu at gmail dot com
2021-10-24 10:02 ` glassmtech at ukr dot net
2021-10-25  8:20 ` pagewhitehea034 at gmail dot com
2021-10-25 18:38 ` ahappliancerepair1 at gmail dot com
2021-10-29 10:57 ` kimolsun2020 at outlook dot com
2021-11-02  9:31 ` amosohxx90 at gmail dot com
2021-11-04  9:21 ` bahamianiridescent at gmail dot com
2021-11-05  9:27 ` bertbxi85 at gmail dot com
2021-11-08 11:50 ` richardsboyer67 at gmail dot com
2021-11-09 11:45 ` johnsjvi95 at gmail dot com
2021-11-17 13:02 ` blareblare2000mar at gmail dot com
2022-10-23 18:52 ` newcastlescaffolding at gmail dot com
2023-03-15  0:57 ` sz1922833 at gmail dot com
2023-03-15  0:57 ` sz1922833 at gmail dot com
2023-03-20  9:55 ` qas_07 at icloud dot com

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=bug-27341-4717-eOiWOWGv1a@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=gdb-prs@sourceware.org \
    /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).