From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 3C9C3388C008; Wed, 10 Jun 2020 13:21:15 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3C9C3388C008 From: "vries at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug pascal/26106] New: gdb/value.c:849: internal-error: bool value_contents_bits_eq(const value*, int, const value*, int, int): Assertion `offset2 + length <= TYPE_LENGTH (val2->enclosing_type) * TARGET_CHAR_BIT' failed. Date: Wed, 10 Jun 2020 13:21:15 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: pascal X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: vries at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gdb-prs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-prs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Jun 2020 13:21:15 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D26106 Bug ID: 26106 Summary: gdb/value.c:849: internal-error: bool value_contents_bits_eq(const value*, int, const value*, int, int): Assertion `offset2 + length <=3D TYPE_LENGTH (val2->enclosing_type) * TARGET_CHAR_BIT' failed. Product: gdb Version: HEAD Status: NEW Severity: normal Priority: P2 Component: pascal Assignee: unassigned at sourceware dot org Reporter: vries at gcc dot gnu.org Target Milestone: --- [ This might be a duplicate of PR25102. ] Consider the patch here ( https://src.fedoraproject.org/rpms/gdb/blob/master/f/gdb-archer-vla-tests.p= atch ). It contains a test-case gdb.pascal/arrays.exp. When running the test-case, we run into: ... FAIL: gdb.pascal/arrays.exp: Print dynamic array of string (GDB internal er= ror) ... In more detail: ... (gdb) print DynArrStr^M $8 =3D {'X!=C3=BA=C3=B7=C3=BF'#127#0#0#24'"=C3=BA=C3=B7', '=C3=BF'#127#0#0#= 152'"=C3=BA=C3=B7=C3=BF'#127#0, #24'#=C3=BA=C3=B7=C3=BF'#127#0#0#152'#=C3=BA=C3=B7', '=C3=BF'#127#0#0#24'$= =C3=BA=C3=B7=C3=BF'#127#0, #152'$=C3=BA=C3=B7=C3=BF'#127#0#0#24'%=C3=BA=C3=B7', '=C3=BF'#127#0#0#152'%= =C3=BA=C3=B7=C3=BF'#127#0, #24'&=C3=BA=C3=B7=C3=BF'#127#0#0#152'&=C3=BA=C3=B7', /data/gdb_versions/dev= el/src/gdb/value.c:849: internal-error: bool value_contents_bits_eq(const value*, int, const value*, int, int): Assertion `offset2 + length <=3D TYPE_LENGTH (val2->enclosing_ty= pe) * TARGET_CHAR_BIT' failed.^M ... To reproduce on the command line: ... $ gdb -batch outputs/gdb.pascal/arrays/arrays -ex "b 81" -ex r -ex "print DynArrStr" ... Values causing assert to trigger: ... (gdb) p offset2 $9 =3D 768 (gdb) p length $10 =3D 96 (gdb) p offset2 + length $11 =3D 864 (gdb) p val2->enclosing_type.length * 8 $12 =3D 832 ... Backtrace: ... (gdb) bt #0 __GI_raise (sig=3Dsig@entry=3D6) at ../sysdeps/unix/sysv/linux/raise.c:= 51 #1 0x00007ffff4f60b01 in __GI_abort () at abort.c:79 #2 0x00000000009a8e2a in dump_core () at src/gdb/utils.c:204 #3 0x00000000009a933c in internal_vproblem(internal_problem *, const char = *, int, const char *, typedef __va_list_tag __va_list_tag *) (problem=3D0x1214= 080 ,=20 file=3D0xca1ff8 "src/gdb/value.c", line=3D849,=20 fmt=3D0xca1f8b "%s: Assertion `%s' failed.", ap=3D0x7fffffffcd68) at src/gdb/utils.c:414 #4 0x00000000009a9404 in internal_verror (file=3D0xca1ff8 "src/gdb/value.c= ", line=3D849,=20 fmt=3D0xca1f8b "%s: Assertion `%s' failed.", ap=3D0x7fffffffcd68) at src/gdb/utils.c:439 #5 0x0000000000b202c9 in internal_error (file=3D0xca1ff8 "src/gdb/value.c", line=3D849,=20 fmt=3D0xca1f8b "%s: Assertion `%s' failed.") at src/gdbsupport/errors.c= c:55 #6 0x00000000009ca2c2 in value_contents_bits_eq (val1=3D0x1bb5540, offset1= =3D672, val2=3D0x1bb5540, offset2=3D768,=20 length=3D96) at src/gdb/value.c:849 #7 0x00000000009ca4fb in value_contents_eq (val1=3D0x1bb5540, offset1=3D84, val2=3D0x1bb5540, offset2=3D96, length=3D12) at src/gdb/value.c:901 #8 0x00000000009c409c in value_print_array_elements (val=3D0x1bb5540, stream=3D0x1a75180, recurse=3D0,=20 options=3D0x7fffffffd1a0, i=3D7) at src/gdb/valprint.c:1933 #9 0x00000000007c9dc1 in pascal_value_print_inner (val=3D0x1bb5540, stream=3D0x1a75180, recurse=3D0,=20 options=3D0x7fffffffd1a0) at src/gdb/p-valprint.c:137 #10 0x00000000009c2214 in do_val_print (value=3D0x1bb5540, stream=3D0x1a751= 80, recurse=3D0, options=3D0x7fffffffd2b0,=20 language=3D0x123c5a0 ) at src/gdb/valprint.c:982 #11 0x00000000009c25d0 in common_val_print (val=3D0x1bb5540, stream=3D0x1a7= 5180, recurse=3D0, options=3D0x7fffffffd2b0,=20 language=3D0x123c5a0 ) at src/gdb/valprint.c:1085 #12 0x00000000007caaa5 in pascal_value_print (val=3D0x1bb5540, stream=3D0x1= a75180, options=3D0x7fffffffd430) at src/gdb/p-valprint.c:437 #13 0x00000000009c26de in value_print (val=3D0x1bb5540, stream=3D0x1a75180, options=3D0x7fffffffd430) at src/gdb/valprint.c:1123 #14 0x00000000007cf65a in print_formatted (val=3D0x1bb5540, size=3D0, options=3D0x7fffffffd430, stream=3D0x1a75180) at src/gdb/printcmd.c:320 #15 0x00000000007d1553 in print_value (val=3D0x1bb5540, opts=3D...) at src/gdb/printcmd.c:1188 #16 0x00000000007d16bb in print_command_1 (args=3D0x7fffffffe0df "DynArrStr= ", voidprint=3D1) at src/gdb/printcmd.c:1222 #17 0x00000000007d179c in print_command (exp=3D0x7fffffffe0df "DynArrStr", from_tty=3D0) at src/gdb/printcmd.c:1244 #18 0x0000000000502956 in do_const_cfunc (c=3D0x1a022f0, args=3D0x7fffffffe= 0df "DynArrStr", from_tty=3D0) at src/gdb/cli/cli-decode.c:95 #19 0x0000000000505c38 in cmd_func (cmd=3D0x1a022f0, args=3D0x7fffffffe0df "DynArrStr", from_tty=3D0) at src/gdb/cli/cli-decode.c:2113 #20 0x0000000000934f79 in execute_command (p=3D0x7fffffffe0e7 "r", from_tty= =3D0) at src/gdb/top.c:655 #21 0x0000000000755dbb in catch_command_errors (command=3D0x934b09 ,=20 arg=3D0x7fffffffe0d9 "print DynArrStr", from_tty=3D0) at src/gdb/main.c= :457 #22 0x000000000075719c in captured_main_1 (context=3D0x7fffffffd9d0) at src/gdb/main.c:1219 #23 0x0000000000757391 in captured_main (data=3D0x7fffffffd9d0) at src/gdb/main.c:1244 #24 0x00000000007573fc in gdb_main (args=3D0x7fffffffd9d0) at src/gdb/main.= c:1269 #25 0x00000000004150b9 in main (argc=3D14, argv=3D0x7fffffffdad8) at src/gdb/gdb.c:32 ... --=20 You are receiving this mail because: You are on the CC list for the bug.=