public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "vries at gcc dot gnu.org" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug ada/25837] New: [cc-with-debug-names] gdb.ada/big_packed_array segv
Date: Thu, 16 Apr 2020 14:26:16 +0000	[thread overview]
Message-ID: <bug-25837-4717@http.sourceware.org/bugzilla/> (raw)

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

            Bug ID: 25837
           Summary: [cc-with-debug-names] gdb.ada/big_packed_array segv
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: ada
          Assignee: unassigned at sourceware dot org
          Reporter: vries at gcc dot gnu.org
  Target Milestone: ---

When running test-case gdb.ada/big_packed_array with target board
cc-with-debug-names, I get:
...
(gdb) print bad^M
warning: could not find bounds information on packed array^M
ERROR: GDB process no longer exists
GDB process exited with wait status 28797 exp9 0 0 CHILDKILLED SIGABRT SIGABRT
UNRESOLVED: gdb.ada/big_packed_array.exp: print bad
...

Easy to reproduce like this:
...
$ gdb -batch outputs/gdb.ada/big_packed_array/foo_ra24_010 -ex "start" -ex
"print bad"
...

segv here:
...
Thread 1 "gdb" received signal SIGSEGV, Segmentation fault.
0x000000000042e41e in to_fixed_array_type (type0=0x0, dval=0x0,
ignore_too_big=1)
    at /data/gdb_versions/devel/src/gdb/ada-lang.c:8704
8704          struct type *elt_type0 = ada_check_typedef (TYPE_TARGET_TYPE 
(type0));
...


Backtrace at segv:
...
(gdb) bt
#0  0x000000000042e41e in to_fixed_array_type (type0=0x0, dval=0x0,
ignore_too_big=1)
    at /data/gdb_versions/devel/src/gdb/ada-lang.c:8704
#1  0x000000000042e95d in ada_to_fixed_type_1 (type=0x1ae49e0, valaddr=0x0,
address=140737488345552, dval=0x0, 
    check_tag=1) at /data/gdb_versions/devel/src/gdb/ada-lang.c:8906
#2  0x000000000042ea2c in ada_to_fixed_type (type=0x1ae49e0, valaddr=0x0,
address=140737488345552, dval=0x0, 
    check_tag=1) at /data/gdb_versions/devel/src/gdb/ada-lang.c:8941
#3  0x000000000042ed0b in ada_to_fixed_value_create (type0=0x1ae49e0,
address=140737488345552, val0=0x1c6f8b0)
    at /data/gdb_versions/devel/src/gdb/ada-lang.c:9090
#4  0x000000000042edc2 in ada_to_fixed_value (val=0x1c6f8b0) at
/data/gdb_versions/devel/src/gdb/ada-lang.c:9114
#5  0x00000000004322ec in ada_evaluate_subexp (expect_type=0x0, exp=0x1b7bb60,
pos=0x7fffffffd1c4, 
    noside=EVAL_AVOID_SIDE_EFFECTS) at
/data/gdb_versions/devel/src/gdb/ada-lang.c:10677
#6  0x0000000000620d68 in evaluate_subexp (expect_type=0x0, exp=0x1b7bb60,
pos=0x7fffffffd1c4, 
    noside=EVAL_AVOID_SIDE_EFFECTS) at
/data/gdb_versions/devel/src/gdb/eval.c:77
#7  0x000000000042f72f in evaluate_subexp_type (exp=0x1b7bb60,
pos=0x7fffffffd1c4)
    at /data/gdb_versions/devel/src/gdb/ada-lang.c:9437
#8  0x0000000000423e48 in resolve_subexp (expp=0x7fffffffd418,
pos=0x7fffffffd1c4, deprocedure_p=1, 
    context_type=0x0, parse_completion=0, tracker=0x7fffffffd2f0)
    at /data/gdb_versions/devel/src/gdb/ada-lang.c:3846
#9  0x0000000000422f9a in resolve (expp=0x7fffffffd418, void_context_p=0,
parse_completion=0, 
    tracker=0x7fffffffd2f0) at /data/gdb_versions/devel/src/gdb/ada-lang.c:3483
#10 0x00000000007af75e in parse_exp_in_context (stringptr=0x7fffffffd3d0, pc=0,
block=0x0, comma=0, 
    void_context_p=0, out_subexp=0x0, tracker=0x7fffffffd2f0, cstate=0x0)
    at /data/gdb_versions/devel/src/gdb/parse.c:1149
#11 0x00000000007af41a in parse_exp_1 (stringptr=0x7fffffffd3d0, pc=0,
block=0x0, comma=0, tracker=0x0)
    at /data/gdb_versions/devel/src/gdb/parse.c:1031
--Type <RET> for more, q to quit, c to continue without paging--
#12 0x00000000007af8c1 in parse_expression (string=0x7fffffffe0eb "bad",
tracker=0x0)
    at /data/gdb_versions/devel/src/gdb/parse.c:1167
#13 0x00000000007b2ba8 in print_command_1 (args=0x7fffffffe0eb "bad",
voidprint=1)
    at /data/gdb_versions/devel/src/gdb/printcmd.c:1214
#14 0x00000000007b2d1e in print_command (exp=0x7fffffffe0eb "bad", from_tty=0)
    at /data/gdb_versions/devel/src/gdb/printcmd.c:1244
#15 0x00000000004fd6be in do_const_cfunc (c=0x198b910, args=0x7fffffffe0eb
"bad", from_tty=0)
    at /data/gdb_versions/devel/src/gdb/cli/cli-decode.c:107
#16 0x0000000000500676 in cmd_func (cmd=0x198b910, args=0x7fffffffe0eb "bad",
from_tty=0)
    at /data/gdb_versions/devel/src/gdb/cli/cli-decode.c:1952
#17 0x000000000090ab33 in execute_command (p=0x7fffffffe0ed "d", from_tty=0)
    at /data/gdb_versions/devel/src/gdb/top.c:655
#18 0x0000000000738bcd in catch_command_errors (command=0x90a6c7
<execute_command(char const*, int)>, 
    arg=0x7fffffffe0e5 "print bad", from_tty=0) at
/data/gdb_versions/devel/src/gdb/main.c:457
#19 0x0000000000739fb5 in captured_main_1 (context=0x7fffffffd9e0)
    at /data/gdb_versions/devel/src/gdb/main.c:1219
#20 0x000000000073a1aa in captured_main (data=0x7fffffffd9e0) at
/data/gdb_versions/devel/src/gdb/main.c:1244
#21 0x000000000073a215 in gdb_main (args=0x7fffffffd9e0) at
/data/gdb_versions/devel/src/gdb/main.c:1269
#22 0x000000000041520e in main (argc=12, argv=0x7fffffffdae8) at
/data/gdb_versions/devel/src/gdb/gdb.c:32
...

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

             reply	other threads:[~2020-04-16 14:26 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-16 14:26 vries at gcc dot gnu.org [this message]
2020-04-17  6:50 ` [Bug ada/25837] " vries at gcc dot gnu.org
2020-04-17 20:13 ` tromey at sourceware dot org
2020-04-17 20:14 ` tromey at sourceware dot org
2020-04-17 20:16 ` tromey at sourceware dot org
2020-04-17 20:26 ` tromey at sourceware dot org
2020-04-17 21:11 ` tromey at sourceware dot org
2020-04-17 22:38 ` brobecker at gnat dot com
2020-04-21 15:15 ` tromey at sourceware dot org
2020-04-21 18:51 ` vries at gcc dot gnu.org
2020-04-23 13:22 ` cvs-commit at gcc dot gnu.org
2020-04-23 13:26 ` tromey at sourceware dot org

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-25837-4717@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).