From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 13CB13858434; Thu, 21 Oct 2021 00:49:14 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 13CB13858434 From: "jwakely.gcc at gmail dot com" To: gdb-prs@sourceware.org Subject: [Bug gdb/28480] pretty printing getting confused Date: Thu, 21 Oct 2021 00:49:13 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: gdb X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jwakely.gcc at gmail dot com X-Bugzilla-Status: UNCONFIRMED 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: Message-ID: In-Reply-To: References: 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: Thu, 21 Oct 2021 00:49:14 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D28480 --- Comment #2 from Jonathan Wakely --- $ valgrind /tmp/gdb/gdb/gdb -q -ex 'br 16' -ex r -ex 'p uptr' -ex qq /tmp/a= .out | grep 'get() =3D' =3D=3D1770130=3D=3D Memcheck, a memory error detector =3D=3D1770130=3D=3D Copyright (C) 2002-2017, and GNU GPL'd, by Julian Sewar= d et al. =3D=3D1770130=3D=3D Using Valgrind-3.18.1 and LibVEX; rerun with -h for cop= yright info =3D=3D1770130=3D=3D Command: /tmp/gdb/gdb/gdb -q -ex br\ 16 -ex r -ex p\ up= tr -ex qq /tmp/a.out =3D=3D1770130=3D=3D=20 warning: linux_ptrace_test_ret_to_nx: WSTOPSIG 6 is neither SIGTRAP nor SIGSEGV! =3D=3D1770130=3D=3D Invalid read of size 1 =3D=3D1770130=3D=3D at 0x484A2F0: memmove (vg_replace_strmem.c:1382) =3D=3D1770130=3D=3D by 0x76FE49: memcpy (string_fortified.h:29) =3D=3D1770130=3D=3D by 0x76FE49: value_contents_copy_raw(value*, long, v= alue*, long, long) (value.c:1330) =3D=3D1770130=3D=3D by 0x7735C0: value_primitive_field(value*, long, int= , type*) (value.c:3036) =3D=3D1770130=3D=3D by 0x764152: struct_field_searcher::search(value*, l= ong, type*) (valops.c:1901) =3D=3D1770130=3D=3D by 0x763E40: struct_field_searcher::search(value*, l= ong, type*) (valops.c:2002) =3D=3D1770130=3D=3D by 0x763E40: struct_field_searcher::search(value*, l= ong, type*) (valops.c:2002) =3D=3D1770130=3D=3D by 0x763E40: struct_field_searcher::search(value*, l= ong, type*) (valops.c:2002) =3D=3D1770130=3D=3D by 0x76423D: search_struct_field(char const*, value*= , type*, int) (valops.c:2023) =3D=3D1770130=3D=3D by 0x766CF0: value_struct_elt(value**, value**, char= const*, int*, char const*) (valops.c:2251) =3D=3D1770130=3D=3D by 0x67DDB6: valpy_getitem(_object*, _object*) (py-v= alue.c:990) =3D=3D1770130=3D=3D by 0x497D836: _PyEval_EvalFrameDefault (ceval.c:2101) =3D=3D1770130=3D=3D by 0x497BE93: UnknownInlinedFun (pycore_ceval.h:46) =3D=3D1770130=3D=3D by 0x497BE93: _PyEval_Vector (ceval.c:5073) =3D=3D1770130=3D=3D Address 0x536a99f is 1 bytes before a block of size 8 = alloc'd =3D=3D1770130=3D=3D at 0x4845464: calloc (vg_replace_malloc.c:1328) =3D=3D1770130=3D=3D by 0x456D60: xcalloc (alloc.c:100) =3D=3D1770130=3D=3D by 0x770986: allocate_value_contents (value.c:1022) =3D=3D1770130=3D=3D by 0x770986: allocate_value_contents (value.c:1016) =3D=3D1770130=3D=3D by 0x770986: allocate_value(type*) (value.c:1033) =3D=3D1770130=3D=3D by 0x77359B: value_primitive_field(value*, long, int= , type*) (value.c:3035) =3D=3D1770130=3D=3D by 0x764152: struct_field_searcher::search(value*, l= ong, type*) (valops.c:1901) =3D=3D1770130=3D=3D by 0x763E40: struct_field_searcher::search(value*, l= ong, type*) (valops.c:2002) =3D=3D1770130=3D=3D by 0x76423D: search_struct_field(char const*, value*= , type*, int) (valops.c:2023) =3D=3D1770130=3D=3D by 0x766CF0: value_struct_elt(value**, value**, char= const*, int*, char const*) (valops.c:2251) =3D=3D1770130=3D=3D by 0x67DDB6: valpy_getitem(_object*, _object*) (py-v= alue.c:990) =3D=3D1770130=3D=3D by 0x497D836: _PyEval_EvalFrameDefault (ceval.c:2101) =3D=3D1770130=3D=3D by 0x497BE93: UnknownInlinedFun (pycore_ceval.h:46) =3D=3D1770130=3D=3D by 0x497BE93: _PyEval_Vector (ceval.c:5073) =3D=3D1770130=3D=3D by 0x4985890: UnknownInlinedFun (call.c:342) =3D=3D1770130=3D=3D by 0x4985890: _PyObject_FastCallDictTstate (call.c:1= 42) =3D=3D1770130=3D=3D=20 $1 =3D std::unique_ptr =3D {get() =3D {}} =3D=3D1770130=3D=3D=20 =3D=3D1770130=3D=3D HEAP SUMMARY: =3D=3D1770130=3D=3D in use at exit: 18,182,520 bytes in 34,241 blocks =3D=3D1770130=3D=3D total heap usage: 259,945 allocs, 225,704 frees, 171,= 556,058 bytes allocated =3D=3D1770130=3D=3D=20 =3D=3D1770130=3D=3D LEAK SUMMARY: =3D=3D1770130=3D=3D definitely lost: 160 bytes in 3 blocks =3D=3D1770130=3D=3D indirectly lost: 0 bytes in 0 blocks =3D=3D1770130=3D=3D possibly lost: 446,388 bytes in 3,992 blocks =3D=3D1770130=3D=3D still reachable: 17,735,972 bytes in 30,246 blocks =3D=3D1770130=3D=3D suppressed: 0 bytes in 0 blocks =3D=3D1770130=3D=3D Rerun with --leak-check=3Dfull to see details of leaked= memory =3D=3D1770130=3D=3D=20 =3D=3D1770130=3D=3D For lists of detected and suppressed errors, rerun with= : -s =3D=3D1770130=3D=3D ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 = from 0) --=20 You are receiving this mail because: You are on the CC list for the bug.=