public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug symtab/18392] New: ../../gdb/dwarf2loc.c:834: internal-error: chain_candidate: Assertion `result->callers + result->callees < result->length' failed
@ 2015-05-09 16:29 schwab@linux-m68k.org
2015-06-01 12:05 ` [Bug symtab/18392] " cvs-commit at gcc dot gnu.org
2015-06-01 12:08 ` jan.kratochvil at redhat dot com
0 siblings, 2 replies; 3+ messages in thread
From: schwab@linux-m68k.org @ 2015-05-09 16:29 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=18392
Bug ID: 18392
Summary: ../../gdb/dwarf2loc.c:834: internal-error:
chain_candidate: Assertion `result->callers +
result->callees < result->length' failed
Product: gdb
Version: 7.9
Status: NEW
Severity: normal
Priority: P2
Component: symtab
Assignee: unassigned at sourceware dot org
Reporter: schwab@linux-m68k.org
CC: jan.kratochvil at redhat dot com
Target Milestone: ---
This assertion happend while debugging cc1. The condition doesn't make sense,
since result is initialized with length == callers == callees.
DW_OP_GNU_entry_value resolving has found function "eliminate_regs_1(rtx_def*,
machine_mode, rtx_def*, bool, bool)" at 0x9d0e40 can call itself via tail calls
may_use_invariant=<optimized out>, for_costs=true)
at ../../gcc/gcc/reload1.c:2917
tailcall: initial: 0x9d12de(eliminate_regs_1(rtx_def*, machine_mode, rtx_def*,
bool, bool))
tailcall: compare: 0x9d1108(eliminate_regs_1(rtx_def*, machine_mode, rtx_def*,
bool, bool)) 0x9d12de(eliminate_regs_1(rtx_def*, machine_mode, rtx_def*, bool,
bool))
tailcall: reduced: | 0x9d12de(eliminate_regs_1(rtx_def*, machine_mode,
rtx_def*, bool, bool))
../../gdb/dwarf2loc.c:830: internal-error: chain_candidate: Assertion
`result->callers + result->callees < result->length' failed.
(top-gdb) p *result
$11 = {callers = 0, callees = 1, length = 1, call_site = {0x278c230}}
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug symtab/18392] ../../gdb/dwarf2loc.c:834: internal-error: chain_candidate: Assertion `result->callers + result->callees < result->length' failed
2015-05-09 16:29 [Bug symtab/18392] New: ../../gdb/dwarf2loc.c:834: internal-error: chain_candidate: Assertion `result->callers + result->callees < result->length' failed schwab@linux-m68k.org
@ 2015-06-01 12:05 ` cvs-commit at gcc dot gnu.org
2015-06-01 12:08 ` jan.kratochvil at redhat dot com
1 sibling, 0 replies; 3+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2015-06-01 12:05 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=18392
--- Comment #1 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jan Kratochvil <jkratoch@sourceware.org>:
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=e0619de699ae6e86d8b93fa96a7668aef2e9636a
commit e0619de699ae6e86d8b93fa96a7668aef2e9636a
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Mon Jun 1 14:02:34 2015 +0200
PR symtab/18392
Initially there is some chain (let's say the longest one
but that doe snot matter). Consequently its elements from the middle are
being removed and there remains only some few unambiguous top and bottom
ones.
The original idea why the comparison should be sharp ("<") was that if
there
are multiple chains like (0xaddr show jmp instruction address):
main(0x100) -> a(0x200) -> d(0x400)
main(0x100) -> a(0x200) -> c(0x300) -> d(0x400)
then - such situation cannot exist - if two jmp instructions in "a" have
the
same address they must also jump to the same address (*).
(*) jump to a computed address would be never considered for the DWARF
tail-call records.
So there could be:
main(0x100) -> a(0x200) -> d(0x400)
main(0x100) -> a(0x270) -> c(0x300) -> d(0x400)
But then "a" frame itself is ambiguous and it must not be displayed.
I did not realize that there can be self-tail-call:
main(0x100) -> a(0x200) -> d(0x400)
main(0x100) -> a(0x280) -> a(0x200) -> d(0x400)
which intersects to:
main(0x100) -> <???>? -> a(0x200) -> d(0x400)
And so if the first chain was chosen the
main(0x100) -> a(0x200) -> d(0x400)
then the final intersection has callers+callees==length.
> for example, if CALLERS is 3 and
> CALLEES is 2, what does the chain look like?
main(0x100) -> x(0x150) -> y(0x200) -> <???>? -> a(0x200) -> d(0x400)
And if LENGTH is 7 then:
call_site[0] = main(0x100)
call_site[1] = x(0x150)
call_site[2] = y(0x200)
call_site[3] = garbage
call_site[4] = garbage
call_site[5] = a(0x200)
call_site[6] = d(0x400)
gdb/ChangeLog
2015-06-01 Andreas Schwab <schwab@linux-m68k.org>
Jan Kratochvil <jan.kratochvil@redhat.com>
PR symtab/18392
* dwarf2-frame-tailcall.c (pretended_chain_levels): Correct
assertion.
* dwarf2loc.c (chain_candidate): Likewise.
gdb/testsuite/ChangeLog
2015-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
PR symtab/18392
* gdb.arch/amd64-tailcall-self.S: New file.
* gdb.arch/amd64-tailcall-self.c: New file.
* gdb.arch/amd64-tailcall-self.exp: New file.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug symtab/18392] ../../gdb/dwarf2loc.c:834: internal-error: chain_candidate: Assertion `result->callers + result->callees < result->length' failed
2015-05-09 16:29 [Bug symtab/18392] New: ../../gdb/dwarf2loc.c:834: internal-error: chain_candidate: Assertion `result->callers + result->callees < result->length' failed schwab@linux-m68k.org
2015-06-01 12:05 ` [Bug symtab/18392] " cvs-commit at gcc dot gnu.org
@ 2015-06-01 12:08 ` jan.kratochvil at redhat dot com
1 sibling, 0 replies; 3+ messages in thread
From: jan.kratochvil at redhat dot com @ 2015-06-01 12:08 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=18392
Jan Kratochvil <jan.kratochvil at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
Assignee|unassigned at sourceware dot org |schwab@linux-m68k.org
--- Comment #2 from Jan Kratochvil <jan.kratochvil at redhat dot com> ---
Checked in.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-06-01 12:08 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-09 16:29 [Bug symtab/18392] New: ../../gdb/dwarf2loc.c:834: internal-error: chain_candidate: Assertion `result->callers + result->callees < result->length' failed schwab@linux-m68k.org
2015-06-01 12:05 ` [Bug symtab/18392] " cvs-commit at gcc dot gnu.org
2015-06-01 12:08 ` jan.kratochvil at redhat dot com
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).