public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/31696] New: internal-error: find_pc_partial_function_sym: Assertion `found' failed.
@ 2024-05-03  9:03 accelerator0099 at gmail dot com
  2024-05-03  9:09 ` [Bug c++/31696] " accelerator0099 at gmail dot com
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: accelerator0099 at gmail dot com @ 2024-05-03  9:03 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=31696

            Bug ID: 31696
           Summary: internal-error: find_pc_partial_function_sym:
                    Assertion `found' failed.
           Product: gdb
           Version: 14.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
          Assignee: unassigned at sourceware dot org
          Reporter: accelerator0099 at gmail dot com
  Target Milestone: ---

Created attachment 15484
  --> https://sourceware.org/bugzilla/attachment.cgi?id=15484&action=edit
read.cpp

# Output:
Reading symbols from a.out...
(gdb) b parser<double>::read
../../gdb/blockframe.c:298: internal-error: find_pc_partial_function_sym:
Assertion `found' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
----- Backtrace -----
0x5eeacbdca3cb ???
0x5eeacc1d5b04 ???
0x5eeacc2c9103 ???
0x5eeacbda2061 ???
0x5eeacbdb353d ???
0x5eeacbdba88f ???
0x5eeacbdbb044 ???
0x5eeacbdbb981 ???
0x5eeacbdbc5a4 ???
0x5eeacbdbca05 ???
0x5eeacbe067a4 ???
0x5eeacc19a645 ???
0x5eeacbeecb27 ???
0x5eeacbeecbd0 ???
0x5eeacbee69af ???
0x7d9b11e6f97e ???
0x5eeacbeeb413 ???
0x5eeacbeeb633 ???
0x5eeacc1ce78f ???
0x5eeacc2ce30d ???
0x5eeacc30aba9 ???
0x5eeacc00be14 ???
0x5eeacbd1f444 ???
0x7d9b10e43ccf ???
0x7d9b10e43d89 ???
0x5eeacbd279e4 ???
0xffffffffffffffff ???
---------------------
../../gdb/blockframe.c:298: internal-error: find_pc_partial_function_sym:
Assertion `found' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Quit this debugging session? (y or n) y

This is a bug, please report it.  For instructions, see:
<https://www.gnu.org/software/gdb/bugs/>.

../../gdb/blockframe.c:298: internal-error: find_pc_partial_function_sym:
Assertion `found' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Create a core file of GDB? (y or n) y

# How to reproduce:

$ g++ -std=c++20 -Wall -g -O3 read.cpp
$ gdb -q a.out
And type "b parser<double>::read"


# Additional information:
Source code and gcc version are in the attachments

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug c++/31696] internal-error: find_pc_partial_function_sym: Assertion `found' failed.
  2024-05-03  9:03 [Bug c++/31696] New: internal-error: find_pc_partial_function_sym: Assertion `found' failed accelerator0099 at gmail dot com
@ 2024-05-03  9:09 ` accelerator0099 at gmail dot com
  2024-05-03 10:21 ` vries at gcc dot gnu.org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: accelerator0099 at gmail dot com @ 2024-05-03  9:09 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=31696

accelerator0099 <accelerator0099 at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #15484|0                           |1
        is obsolete|                            |

--- Comment #1 from accelerator0099 <accelerator0099 at gmail dot com> ---
Created attachment 15485
  --> https://sourceware.org/bugzilla/attachment.cgi?id=15485&action=edit
Source code, output executable, core dump and gcc version

Add gcc version, output executable and gdb core dump

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug c++/31696] internal-error: find_pc_partial_function_sym: Assertion `found' failed.
  2024-05-03  9:03 [Bug c++/31696] New: internal-error: find_pc_partial_function_sym: Assertion `found' failed accelerator0099 at gmail dot com
  2024-05-03  9:09 ` [Bug c++/31696] " accelerator0099 at gmail dot com
@ 2024-05-03 10:21 ` vries at gcc dot gnu.org
  2024-05-03 10:33 ` vries at gcc dot gnu.org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: vries at gcc dot gnu.org @ 2024-05-03 10:21 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=31696

Tom de Vries <vries at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |vries at gcc dot gnu.org

--- Comment #2 from Tom de Vries <vries at gcc dot gnu.org> ---
I build gdb 14.1 release on aarch64-linux, and used the x86_64 a.out from the
attachment to reproduce the problem.

Detailed backtrace:
...
(gdb) bt
#0  0x0000fffff5ab2280 in __pthread_kill_implementation () from
/lib64/libc.so.6
#1  0x0000fffff5a65800 [PAC] in raise () from /lib64/libc.so.6
#2  0x0000fffff5a50288 [PAC] in abort () from /lib64/libc.so.6
#3  0x0000fffff6e79494 [PAC] in abort () from /lib64/libtsan.so.2
#4  0x000000000103d310 [PAC] in dump_core () at
/home/vries/gdb/src/gdb/utils.c:198
#5  0x000000000103dc48 in internal_vproblem (
    problem=0x2e5b9e8 <internal_error_problem>, 
    file=0x1cd0928 "/home/vries/gdb/src/gdb/blockframe.c", line=298, 
    fmt=0x1cd08e8 "%s: Assertion `%s' failed.", ap=...)
    at /home/vries/gdb/src/gdb/utils.c:450
#6  0x000000000103dd54 in internal_verror (
    file=0x1cd0928 "/home/vries/gdb/src/gdb/blockframe.c", line=298, 
    fmt=0x1cd08e8 "%s: Assertion `%s' failed.", ap=...)
    at /home/vries/gdb/src/gdb/utils.c:476
#7  0x0000000001c31bc0 in internal_error_loc (
    file=0x1cd0928 "/home/vries/gdb/src/gdb/blockframe.c", line=298, 
    fmt=0x1cd08e8 "%s: Assertion `%s' failed.")
    at /home/vries/gdb/src/gdbsupport/errors.cc:58
#8  0x00000000005e792c in find_pc_partial_function_sym (pc=5744,
sym=0xffffffffd5a0, 
    address=0x0, endaddr=0x0, block=0x0) at
/home/vries/gdb/src/gdb/blockframe.c:298
#9  0x00000000005e7c78 in find_pc_partial_function (pc=5744,
name=0xffffffffd5e8, 
    address=0x0, endaddr=0x0, block=0x0) at
/home/vries/gdb/src/gdb/blockframe.c:377
#10 0x0000000000613930 in set_breakpoint_location_function (loc=0xffffeed016c0)
    at /home/vries/gdb/src/gdb/breakpoint.c:7644
#11 0x0000000000616ec4 in code_breakpoint::add_location (this=0xffffdf801b30,
sal=...)
    at /home/vries/gdb/src/gdb/breakpoint.c:8490
#12 0x0000000000617a40 in code_breakpoint::code_breakpoint
(this=0xffffdf801b30, 
    gdbarch_=0xffffedb09a00, type_=bp_breakpoint, sals=..., locspec_=..., 
    filter_=std::unique_ptr<char> = {...}, cond_string_=std::unique_ptr<char> =
{...}, 
    extra_string_=std::unique_ptr<char> = {...}, disposition_=disp_donttouch, 
    thread_=-1, task_=-1, inferior_=-1, ignore_count_=0, from_tty=0,
enabled_=1, 
    flags=0, display_canonical_=0) at /home/vries/gdb/src/gdb/breakpoint.c:8700
#13 0x000000000063b3e8 in ordinary_breakpoint::code_breakpoint
(this=0xffffdf801b30)
    at /home/vries/gdb/src/gdb/breakpoint.c:328
#14 0x000000000062d988 in
new_breakpoint_from_type<gdb::array_view<symtab_and_line const>&,
std::unique_ptr<location_spec, std::default_delete<location_spec> >,
std::unique_ptr<c--Type <RET> for more, q to quit, c to continue without
paging--
har, gdb::xfree_deleter<char> >, std::unique_ptr<char, gdb::xfree_deleter<char>
>, std::unique_ptr<char, gdb::xfree_deleter<char> >, bpdisp&, int&, int&, int&,
int&, int&, int&, unsigned int&, int&> (gdbarch=0xffffedb09a00,
type=bp_breakpoint)
    at /home/vries/gdb/src/gdb/breakpoint.c:1398
#15 0x0000000000617ddc in create_breakpoint_sal (gdbarch=0xffffedb09a00,
sals=..., 
    locspec=..., filter=std::unique_ptr<char> = {...}, 
    cond_string=std::unique_ptr<char> = {...}, 
    extra_string=std::unique_ptr<char> = {...}, type=bp_breakpoint, 
    disposition=disp_donttouch, thread=-1, task=-1, inferior=-1,
ignore_count=0, 
    from_tty=0, enabled=1, internal=0, flags=0, display_canonical=0)
    at /home/vries/gdb/src/gdb/breakpoint.c:8766
#16 0x00000000006180c4 in create_breakpoints_sal (gdbarch=0xffffedb09a00, 
    canonical=0xffffffffddb8, cond_string=std::unique_ptr<char> = {...}, 
    extra_string=std::unique_ptr<char> = {...}, type=bp_breakpoint, 
    disposition=disp_donttouch, thread=-1, task=-1, inferior=-1,
ignore_count=0, 
    from_tty=0, enabled=1, internal=0, flags=0)
    at /home/vries/gdb/src/gdb/breakpoint.c:8811
#17 0x0000000000619c40 in create_breakpoint (gdbarch=0xffffedb09a00, 
    locspec=0xfffff3204dc0, cond_string=0x0, thread=-1, inferior=-1,
extra_string=0x0, 
    force_condition=false, parse_extra=1, tempflag=0,
type_wanted=bp_breakpoint, 
    ignore_count=0, pending_break_support=AUTO_BOOLEAN_AUTO, 
    ops=0x1cd3240 <code_breakpoint_ops>, from_tty=0, enabled=1, internal=0,
flags=0)
    at /home/vries/gdb/src/gdb/breakpoint.c:9353
#18 0x000000000061a214 in break_command_1 (arg=0xffffffffed7f "", flag=0,
from_tty=0)
    at /home/vries/gdb/src/gdb/breakpoint.c:9425
#19 0x000000000061a574 in break_command (arg=0xffffffffed6b
"parser<double>::read", 
    from_tty=0) at /home/vries/gdb/src/gdb/breakpoint.c:9495
#20 0x00000000006decc4 in do_simple_func (args=0xffffffffed6b
"parser<double>::read", 
    from_tty=0, c=0xffffdfc1ef00) at
/home/vries/gdb/src/gdb/cli/cli-decode.c:95
#21 0x00000000006e6400 in cmd_func (cmd=0xffffdfc1ef00, 
    args=0xffffffffed6b "parser<double>::read", from_tty=0)
    at /home/vries/gdb/src/gdb/cli/cli-decode.c:2735
#22 0x0000000000fb80b0 in execute_command (p=0xffffffffed7e "d", from_tty=0)
    at /home/vries/gdb/src/gdb/top.c:575
#23 0x0000000000b58bf0 in catch_command_errors (
    command=0xfb7a00 <execute_command(char const*, int)>, 
    arg=0xffffffffed69 "b parser<double>::read", from_tty=0,
do_bp_actions=true)
    at /home/vries/gdb/src/gdb/main.c:513
#24 0x0000000000b58f24 in execute_cmdargs (cmdarg_vec=0xffffffffe448, 
    file_type=CMDARG_FILE, cmd_type=CMDARG_COMMAND, ret=0xffffffffe42c)
    at /home/vries/gdb/src/gdb/main.c:612
#25 0x0000000000b5ac2c in captured_main_1 (context=0xffffffffe698)
    at /home/vries/gdb/src/gdb/main.c:1293
#26 0x0000000000b5ae0c in captured_main (data=0xffffffffe698)
    at /home/vries/gdb/src/gdb/main.c:1314
#27 0x0000000000b5aec0 in gdb_main (args=0xffffffffe698)
    at /home/vries/gdb/src/gdb/main.c:1343
#28 0x0000000000423d6c in main (argc=8, argv=0xffffffffe828)
    at /home/vries/gdb/src/gdb/gdb.c:39
...

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug c++/31696] internal-error: find_pc_partial_function_sym: Assertion `found' failed.
  2024-05-03  9:03 [Bug c++/31696] New: internal-error: find_pc_partial_function_sym: Assertion `found' failed accelerator0099 at gmail dot com
  2024-05-03  9:09 ` [Bug c++/31696] " accelerator0099 at gmail dot com
  2024-05-03 10:21 ` vries at gcc dot gnu.org
@ 2024-05-03 10:33 ` vries at gcc dot gnu.org
  2024-05-03 14:10 ` vries at gcc dot gnu.org
  2024-05-04  8:38 ` vries at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: vries at gcc dot gnu.org @ 2024-05-03 10:33 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=31696

Tom de Vries <vries at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Version|14.1                        |HEAD

--- Comment #3 from Tom de Vries <vries at gcc dot gnu.org> ---
Reproduces with current trunk.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug c++/31696] internal-error: find_pc_partial_function_sym: Assertion `found' failed.
  2024-05-03  9:03 [Bug c++/31696] New: internal-error: find_pc_partial_function_sym: Assertion `found' failed accelerator0099 at gmail dot com
                   ` (2 preceding siblings ...)
  2024-05-03 10:33 ` vries at gcc dot gnu.org
@ 2024-05-03 14:10 ` vries at gcc dot gnu.org
  2024-05-04  8:38 ` vries at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: vries at gcc dot gnu.org @ 2024-05-03 14:10 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=31696

--- Comment #4 from Tom de Vries <vries at gcc dot gnu.org> ---
(In reply to accelerator0099 from comment #0)
> $ g++ -std=c++20 -Wall -g -O3 read.cpp

Reproduced from source on x86_64-linux.

Also managed to reproduce at O2 by adding two O3 settings (as found in
gcc/opts.cc):
...
$ g++-13 -std=c++20 -Wall -g -O2 --param=max-inline-insns-auto=30
--param=inline-heuristics-hint-percent=600 read.cpp
...

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug c++/31696] internal-error: find_pc_partial_function_sym: Assertion `found' failed.
  2024-05-03  9:03 [Bug c++/31696] New: internal-error: find_pc_partial_function_sym: Assertion `found' failed accelerator0099 at gmail dot com
                   ` (3 preceding siblings ...)
  2024-05-03 14:10 ` vries at gcc dot gnu.org
@ 2024-05-04  8:38 ` vries at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: vries at gcc dot gnu.org @ 2024-05-04  8:38 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=31696

--- Comment #5 from Tom de Vries <vries at gcc dot gnu.org> ---
Created attachment 15491
  --> https://sourceware.org/bugzilla/attachment.cgi?id=15491&action=edit
read.cpp, manually reduced

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-05-04  8:38 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-03  9:03 [Bug c++/31696] New: internal-error: find_pc_partial_function_sym: Assertion `found' failed accelerator0099 at gmail dot com
2024-05-03  9:09 ` [Bug c++/31696] " accelerator0099 at gmail dot com
2024-05-03 10:21 ` vries at gcc dot gnu.org
2024-05-03 10:33 ` vries at gcc dot gnu.org
2024-05-03 14:10 ` vries at gcc dot gnu.org
2024-05-04  8:38 ` vries 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).