public inbox for gdb-prs@sourceware.org help / color / mirror / Atom feed
* [Bug c++/29243] New: infinite loop in generic_value_print @ 2022-06-10 23:46 roland at gnu dot org 2022-06-10 23:48 ` [Bug c++/29243] " roland at gnu dot org ` (6 more replies) 0 siblings, 7 replies; 8+ messages in thread From: roland at gnu dot org @ 2022-06-10 23:46 UTC (permalink / raw) To: gdb-prs https://sourceware.org/bugzilla/show_bug.cgi?id=29243 Bug ID: 29243 Summary: infinite loop in generic_value_print Product: gdb Version: HEAD Status: NEW Severity: normal Priority: P2 Component: c++ Assignee: unassigned at sourceware dot org Reporter: roland at gnu dot org Target Milestone: --- Created attachment 14142 --> https://sourceware.org/bugzilla/attachment.cgi?id=14142&action=edit x86_64-linux-gnu target assembly source The source to reproduce this is quite small. However, GCC 12 does not emit DWARF that causes the issue in GDB. Current ToT Clang does. I've attached the .s file produced by Clang; turning that into an object that you can load into gdb should reproduce the same problem. ``` // clang++ -std=c++17 -O2 -g3 -gdwarf-5 -shared -o foo.so foo.cc // gdb foo.so // (gdb) i func struct S { bool x, y; }; namespace { template <auto M> constexpr bool kFoo = true; } // bool t() { return kFoo<&S::x>; } bool f() { return kFoo<&S::y>; } ``` -- You are receiving this mail because: You are on the CC list for the bug. ^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/29243] infinite loop in generic_value_print 2022-06-10 23:46 [Bug c++/29243] New: infinite loop in generic_value_print roland at gnu dot org @ 2022-06-10 23:48 ` roland at gnu dot org 2022-06-11 19:38 ` tromey at sourceware dot org ` (5 subsequent siblings) 6 siblings, 0 replies; 8+ messages in thread From: roland at gnu dot org @ 2022-06-10 23:48 UTC (permalink / raw) To: gdb-prs https://sourceware.org/bugzilla/show_bug.cgi?id=29243 Roland McGrath <roland at gnu dot org> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|unassigned at sourceware dot org |tromey at sourceware dot org Status|NEW |ASSIGNED --- Comment #1 from Roland McGrath <roland at gnu dot org> --- Commit 6b5a7bc768570edc15532759969cd9bff3f02c28 seems suspect here. Tom, can you take a look? -- You are receiving this mail because: You are on the CC list for the bug. ^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/29243] infinite loop in generic_value_print 2022-06-10 23:46 [Bug c++/29243] New: infinite loop in generic_value_print roland at gnu dot org 2022-06-10 23:48 ` [Bug c++/29243] " roland at gnu dot org @ 2022-06-11 19:38 ` tromey at sourceware dot org 2022-06-13 19:39 ` roland at gnu dot org ` (4 subsequent siblings) 6 siblings, 0 replies; 8+ messages in thread From: tromey at sourceware dot org @ 2022-06-11 19:38 UTC (permalink / raw) To: gdb-prs https://sourceware.org/bugzilla/show_bug.cgi?id=29243 --- Comment #2 from Tom Tromey <tromey at sourceware dot org> --- (In reply to Roland McGrath from comment #0) > Current ToT Clang does. I've attached the .s file produced by Clang; > turning that into an object that you can load into gdb should reproduce the > same problem. gas doesn't like this .s file. Can you just attach a .o. -- You are receiving this mail because: You are on the CC list for the bug. ^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/29243] infinite loop in generic_value_print 2022-06-10 23:46 [Bug c++/29243] New: infinite loop in generic_value_print roland at gnu dot org 2022-06-10 23:48 ` [Bug c++/29243] " roland at gnu dot org 2022-06-11 19:38 ` tromey at sourceware dot org @ 2022-06-13 19:39 ` roland at gnu dot org 2022-06-13 19:42 ` roland at gnu dot org ` (3 subsequent siblings) 6 siblings, 0 replies; 8+ messages in thread From: roland at gnu dot org @ 2022-06-13 19:39 UTC (permalink / raw) To: gdb-prs https://sourceware.org/bugzilla/show_bug.cgi?id=29243 --- Comment #3 from Roland McGrath <roland at gnu dot org> --- Created attachment 14143 --> https://sourceware.org/bugzilla/attachment.cgi?id=14143&action=edit gas-compatible assembly source This is a version of the same .s file that gas accepts. -- You are receiving this mail because: You are on the CC list for the bug. ^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/29243] infinite loop in generic_value_print 2022-06-10 23:46 [Bug c++/29243] New: infinite loop in generic_value_print roland at gnu dot org ` (2 preceding siblings ...) 2022-06-13 19:39 ` roland at gnu dot org @ 2022-06-13 19:42 ` roland at gnu dot org 2022-10-18 17:53 ` tromey at sourceware dot org ` (2 subsequent siblings) 6 siblings, 0 replies; 8+ messages in thread From: roland at gnu dot org @ 2022-06-13 19:42 UTC (permalink / raw) To: gdb-prs https://sourceware.org/bugzilla/show_bug.cgi?id=29243 --- Comment #4 from Roland McGrath <roland at gnu dot org> --- Created attachment 14144 --> https://sourceware.org/bugzilla/attachment.cgi?id=14144&action=edit .o file Here is the .o file from that .s file. -- You are receiving this mail because: You are on the CC list for the bug. ^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/29243] infinite loop in generic_value_print 2022-06-10 23:46 [Bug c++/29243] New: infinite loop in generic_value_print roland at gnu dot org ` (3 preceding siblings ...) 2022-06-13 19:42 ` roland at gnu dot org @ 2022-10-18 17:53 ` tromey at sourceware dot org 2022-10-31 14:57 ` tromey at sourceware dot org 2022-10-31 14:59 ` cvs-commit at gcc dot gnu.org 6 siblings, 0 replies; 8+ messages in thread From: tromey at sourceware dot org @ 2022-10-18 17:53 UTC (permalink / raw) To: gdb-prs https://sourceware.org/bugzilla/show_bug.cgi?id=29243 Tom Tromey <tromey at sourceware dot org> changed: What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |13.1 --- Comment #5 from Tom Tromey <tromey at sourceware dot org> --- https://sourceware.org/pipermail/gdb-patches/2022-October/192804.html -- You are receiving this mail because: You are on the CC list for the bug. ^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/29243] infinite loop in generic_value_print 2022-06-10 23:46 [Bug c++/29243] New: infinite loop in generic_value_print roland at gnu dot org ` (4 preceding siblings ...) 2022-10-18 17:53 ` tromey at sourceware dot org @ 2022-10-31 14:57 ` tromey at sourceware dot org 2022-10-31 14:59 ` cvs-commit at gcc dot gnu.org 6 siblings, 0 replies; 8+ messages in thread From: tromey at sourceware dot org @ 2022-10-31 14:57 UTC (permalink / raw) To: gdb-prs https://sourceware.org/bugzilla/show_bug.cgi?id=29243 Tom Tromey <tromey at sourceware dot org> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|ASSIGNED |RESOLVED --- Comment #6 from Tom Tromey <tromey at sourceware dot org> --- Fixed. -- You are receiving this mail because: You are on the CC list for the bug. ^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/29243] infinite loop in generic_value_print 2022-06-10 23:46 [Bug c++/29243] New: infinite loop in generic_value_print roland at gnu dot org ` (5 preceding siblings ...) 2022-10-31 14:57 ` tromey at sourceware dot org @ 2022-10-31 14:59 ` cvs-commit at gcc dot gnu.org 6 siblings, 0 replies; 8+ messages in thread From: cvs-commit at gcc dot gnu.org @ 2022-10-31 14:59 UTC (permalink / raw) To: gdb-prs https://sourceware.org/bugzilla/show_bug.cgi?id=29243 --- Comment #7 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Tom Tromey <tromey@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=86430497337968e6163aef370c6312e7b5ed6504 commit 86430497337968e6163aef370c6312e7b5ed6504 Author: Tom Tromey <tromey@adacore.com> Date: Tue Oct 18 11:32:52 2022 -0600 Fix regression in pointer-to-member printing PR c++/29243 points out that "info func" on a certain C++ executable will cause an infinite loop in gdb. I tracked this down to a bug introduced by commit 6b5a7bc76 ("Handle member pointers directly in generic_value_print"). Before this commit, the C++ code to print a member pointer would wind up calling value_print_scalar_formatted; but afterward it simply calls generic_value_print and gets into a loop. This patch restores the previous behavior and adds a regression test. -- You are receiving this mail because: You are on the CC list for the bug. ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2022-10-31 14:59 UTC | newest] Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2022-06-10 23:46 [Bug c++/29243] New: infinite loop in generic_value_print roland at gnu dot org 2022-06-10 23:48 ` [Bug c++/29243] " roland at gnu dot org 2022-06-11 19:38 ` tromey at sourceware dot org 2022-06-13 19:39 ` roland at gnu dot org 2022-06-13 19:42 ` roland at gnu dot org 2022-10-18 17:53 ` tromey at sourceware dot org 2022-10-31 14:57 ` tromey at sourceware dot org 2022-10-31 14:59 ` cvs-commit at gcc dot gnu.org
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).