From: "YAMAZAKI MASAMITSU(山崎 真光)" <yamazaki-msmt@nec.com>
To: "Tao Liu" <ltao@redhat.com>,
"HAGIO KAZUHITO(萩尾 一仁)" <k-hagio-ab@nec.com>,
"kexec@lists.infradead.org" <kexec@lists.infradead.org>
Cc: "aravinda@linux.vnet.ibm.com" <aravinda@linux.vnet.ibm.com>,
"devel@lists.crash-utility.osci.io"
<devel@lists.crash-utility.osci.io>
Subject: Re: [PATCH RFC][makedumpfile 02/10] dwarf_info: Fix a infinite recursion bug for search_domain
Date: Fri, 3 Oct 2025 07:22:52 +0000 [thread overview]
Message-ID: <ec719745-caa8-4b97-945e-6409234a217d@nec.com> (raw)
In-Reply-To: <20250610095743.18073-3-ltao@redhat.com>
On 2025/06/10 18:57, Tao Liu wrote:
> There is an infinite recursion bug noticed in rust symbols. The root cause is
> unclear to me. This patch will avoid the bug by skip the recursion of rust
> symbols, since currently we don't need to deal with those.
>
> Signed-off-by: Tao Liu <ltao@redhat.com>
> ---
> dwarf_info.c | 15 ++++++++-------
> 1 file changed, 8 insertions(+), 7 deletions(-)
>
> diff --git a/dwarf_info.c b/dwarf_info.c
> index a3a2fd6..73842ab 100644
> --- a/dwarf_info.c
> +++ b/dwarf_info.c
> @@ -837,7 +837,7 @@ search_symbol(Dwarf_Die *die, int *found)
> }
>
> static void
> -search_domain(Dwarf_Die *die, int *found)
> +search_domain(Dwarf_Die *die, int *found, int lang)
> {
> int tag;
> const char *name;
> @@ -859,10 +859,11 @@ search_domain(Dwarf_Die *die, int *found)
> if (is_container(&die_type)) {
> Dwarf_Die child;
>
> - if (dwarf_child(&die_type, &child) != 0)
> + if (dwarf_child(&die_type, &child) != 0 ||
> + lang == DW_LANG_Rust)
> continue;
>
> - search_domain(&child, found);
> + search_domain(&child, found, lang);
>
> if (*found)
> return;
> @@ -924,7 +925,7 @@ search_die(Dwarf_Die *die, int *found)
> }
>
> static void
> -search_die_tree(Dwarf_Die *die, int *found)
> +search_die_tree(Dwarf_Die *die, int *found, int lang)
> {
> Dwarf_Die child;
>
> @@ -932,7 +933,7 @@ search_die_tree(Dwarf_Die *die, int *found)
> * start by looking at the children
> */
> if (dwarf_child(die, &child) == 0)
> - search_die_tree(&child, found);
> + search_die_tree(&child, found, lang);
>
> if (*found)
> return;
> @@ -950,7 +951,7 @@ search_die_tree(Dwarf_Die *die, int *found)
> search_typedef(die, found);
>
> else if (is_search_domain(dwarf_info.cmd))
> - search_domain(die, found);
> + search_domain(die, found, lang);
>
> else if (is_search_die(dwarf_info.cmd))
> search_die(die, found);
> @@ -1007,7 +1008,7 @@ get_debug_info(void)
> ERRMSG("Can't get CU die.\n");
> goto out;
> }
> - search_die_tree(&cu_die, &found);
> + search_die_tree(&cu_die, &found, dwarf_srclang(&cu_die));
> if (found)
> break;
> off = next_off;
Hi Liu
This problem need to be solve. But I don't know how to reproduce.
If Your server is running rust program. Or Or is it running as a
module by rust? Please tell me how to reproduce it.
Thanks,
Masa
next prev parent reply other threads:[~2025-10-03 7:23 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-10 9:57 [PATCH RFC][makedumpfile 00/10] btf/kallsyms based eppic extension for mm page filtering Tao Liu
2025-06-10 9:57 ` [PATCH RFC][makedumpfile 01/10] dwarf_info: Support kernel address randomization Tao Liu
2025-09-08 11:11 ` YAMAZAKI MASAMITSU(山崎 真光)
2025-09-09 5:24 ` Tao Liu
2025-09-29 6:30 ` HAGIO KAZUHITO(萩尾 一仁)
2025-09-30 0:34 ` Tao Liu
2025-09-30 1:28 ` HAGIO KAZUHITO(萩尾 一仁)
2025-09-30 1:44 ` Tao Liu
2025-06-10 9:57 ` [PATCH RFC][makedumpfile 02/10] dwarf_info: Fix a infinite recursion bug for search_domain Tao Liu
2025-10-03 7:22 ` YAMAZAKI MASAMITSU(山崎 真光) [this message]
2025-10-05 23:25 ` Tao Liu
2025-10-17 4:21 ` HAGIO KAZUHITO(萩尾 一仁)
2025-10-20 3:52 ` Tao Liu
2025-06-10 9:57 ` [PATCH RFC][makedumpfile 03/10] Add page filtering function Tao Liu
2025-06-10 9:57 ` [PATCH RFC][makedumpfile 04/10] Add btf/kallsyms support for symbol type/address resolving Tao Liu
2025-06-10 9:57 ` [PATCH RFC][makedumpfile 05/10] Export necessary btf/kallsyms functions to eppic extension Tao Liu
2025-06-10 9:57 ` [PATCH RFC][makedumpfile 06/10] Port the maple tree data structures and functions Tao Liu
2025-06-10 9:57 ` [PATCH RFC][makedumpfile 07/10] Supporting main() as the entry of eppic script Tao Liu
2025-06-10 9:57 ` [PATCH RFC][makedumpfile 08/10] Enable page filtering for dwarf eppic Tao Liu
2025-06-10 9:57 ` [PATCH RFC][makedumpfile 09/10] Enable page filtering for btf/kallsyms eppic Tao Liu
2025-06-10 9:57 ` [PATCH RFC][makedumpfile 10/10] Introducing 2 eppic scripts to test the dwarf/btf eppic extension Tao Liu
2025-08-05 3:16 ` [PATCH RFC][makedumpfile 00/10] btf/kallsyms based eppic extension for mm page filtering Tao Liu
2025-08-07 11:42 ` YAMAZAKI MASAMITSU(山崎 真光)
2025-08-11 0:04 ` Tao Liu
2025-09-05 12:41 ` YAMAZAKI MASAMITSU(山崎 真光)
2025-09-09 1:56 ` Tao Liu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ec719745-caa8-4b97-945e-6409234a217d@nec.com \
--to=yamazaki-msmt@nec.com \
--cc=aravinda@linux.vnet.ibm.com \
--cc=devel@lists.crash-utility.osci.io \
--cc=k-hagio-ab@nec.com \
--cc=kexec@lists.infradead.org \
--cc=ltao@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox