This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug gdb/20760] New: Crash when casting variable to char[][] type
- From: "rikard.falkeborn at gmail dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Wed, 02 Nov 2016 07:34:18 +0000
- Subject: [Bug gdb/20760] New: Crash when casting variable to char[][] type
- Auto-submitted: auto-generated
https://sourceware.org/bugzilla/show_bug.cgi?id=20760
Bug ID: 20760
Summary: Crash when casting variable to char[][] type
Product: gdb
Version: 7.12.1
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: gdb
Assignee: unassigned at sourceware dot org
Reporter: rikard.falkeborn at gmail dot com
Target Milestone: ---
GDB crashes when trying to print a variable as (char[][]) (and int[][], didn't
try any others). The cast may be bogus, but GDB shouldn't crash. See below for
a minimal example. GCC 6.2.1 was used to build the test case.
$ cat cast-crash.c
int main(int argc, char *argv[])
{
return 0;
}
$ gcc -g cast-crash.c
$ gdb ./a.out
(gdb) break main
(gdb) run
Starting program: /home/rikard/code/test/a.out
Breakpoint 1, main (argc=1, argv=0x7fffffffe998) at cast-crash.c:3
3 return 0;
(gdb) print (char[][]) argc
$1 =
gdbtypes.c:4610: internal-error: type* copy_type(const type*): Assertion
`TYPE_OBJFILE_OWNED (type)' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Quit this debugging session? (y or n)
--
You are receiving this mail because:
You are on the CC list for the bug.