From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 55B2D3857813; Sat, 9 Oct 2021 11:00:46 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 55B2D3857813 From: "gulsenenginar at aol dot com" To: gdb-prs@sourceware.org Subject: [Bug varobj/27757] -var-list-children coredump Date: Sat, 09 Oct 2021 11:00:46 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: varobj X-Bugzilla-Version: 10.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: gulsenenginar at aol dot com X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: FIXED X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: 10.2 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc 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: Sat, 09 Oct 2021 11:00:46 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D27757 Gulsen Engin changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |gulsenenginar at aol dot c= om --- Comment #30 from Gulsen Engin --- $ cat test.c struct foo { int len; https://www.webb-dev.co.uk/category/computers/ int items[]; }; struct foo *p; http://www.compilatori.com/category/technology/ int main() { return 0; } $ gcc test.c -g -O0 -o test http://www.acpirateradio.co.uk/category/computers/ $ ./gdb -q -nx --data-directory=3Ddata-directory ./test -ex 'python gdb.parse_and_eval("p").type.target()["items"].type.range()' Reading symbols from ./test... http://www-look-4.com/category/computers/ /home/simark/src/binutils-gdb/gdb/gdbtypes.h:435: internal-error: LONGEST dynamic_prop::const_val() const: Assertion `m_kind =3D=3D PROP_CONS= T' failed. A problem internal to GDB has been detected, further debugging may prove unreliable. Quit this debugging session? (y or n) http://www.logoarts.co.uk/category/computers/ This is because the Python code (typy_range) blindly reads the high bound of the type of `items` as a constant value. Since it is a http://www.iu-bloomington.com/category/computers/ flexible array member, it has no high bound, the property is undefined. Since commit 8c2e4e0689 https://komiya-dental.com/category/computers/ ("gdb: add accessors to struct dynamic_prop"), the getters check that you are not getting a property value of the wrong kind, so this causes a failed assertion. http://www.slipstone.co.uk/category/computers/ Fix it by checking if the property is indeed a constant value before http://embermanchester.uk/category/computers/ accessing it as such. Otherwise, use 0. This restores the previous GDB behavior: because the structure was zero-initialized, http://connstr.net/category/computers/ this is what was returned before. But now this behavior is explicit and not accidental. http://joerg.li/category/computers/ Add a test, gdb.python/flexible-array-member.exp, that is derived from gdb.base/flexible-array-member.exp. http://www.jopspeech.com/category/computers/ It tests the same things, but through the Python API. It also specifically tests getting the range from the various kinds http://www.wearelondonmade.com/category/computer= s/ of flexible array member types (AFAIK it wasn't possible to do the equivalent through the CLI). https://waytowhatsnext.com/category/computers/ gdb/ChangeLog: https://pro-sangyoui.com/ https://fintechzoom.com/reviews/15-best-water-bottles-of-2021/ https://fintechzoom.com/reviews/10-best-yoga-mats-of-2021/ https://wikifinancepedia.com/ https://financeplusinsurance.com/ https://financeinsuranceblog.com/ https://fintechzoom.com/reviews/the-greatest-robot-vacuums-for-assure-clean= er-floors/ https://fintechzoom.com/reviews/the-11-best-air-purifiers-in-2021/ https://fintechzoom.com/reviews/the-6-best-cordless-stick-vacuum-in-2021/ https://amazon.com/Christopher-Horne/e/B08D6C1D2P%3Fref=3Ddbs_a_mng_rwt_scn= s_share https://nhacai888b.com/ https://www.soicau888.net/ https://kaiyokukan.vn/ http://twin688.net/ https://typhu88.me/ https://fitveform.com/ https://www.thegamblinggurus.com/ https://nodepositpokeronline.com/ https://onlinecasinoku.com/ https://slickcashloanca.blogspot.com/ https://www.aaz-credit-immobilier.com/ https://www.sport-trader.com/ https://www.lespersiennes.com/ https://www.espresso-international.it/ https://www.espresso-international.fi/ https://footballexpress.in/category/indian-football/i-league/ https://sixsports.in/category/cricket/international-cricket/indian-cricket/ https://true-tech.net/category/learnae/ https://www.alivechristians.com/bible-verses-about-healing-sickness/ https://photoslate.co/ https://trellising-net.com/ https://www.seminariostop.com/seminarios-y-talleres/como-importar-de-china-= alibaba-aliexpress-dropshipping-peru/ https://bestonlinegambler.com/ https://vipcasinotips.com/ https://casinogamblingideas.com/ https://realmoneycasinoguides.com/ https://casinoexpertadvice.com/ https://komopoker5.com/ https://zehabesha.com/ --=20 You are receiving this mail because: You are on the CC list for the bug.=