[PATCH v2][makedumpfile 04/14] dwarf_info: Fix a infinite recursion bug for rust symbols
HAGIO KAZUHITO(萩尾 一仁)
k-hagio-ab at nec.com
Sun Oct 26 19:58:02 PDT 2025
Hi Tao,
applied the two patches with tweaks.
https://github.com/makedumpfile/makedumpfile/commit/f1f3561cdbdf3f5e626b6e15e3899f80b6d1a975
https://github.com/makedumpfile/makedumpfile/commit/a443eb654bc91858d22ccdf5d68a090df94f9423
Thanks,
Kazu
On 2025/10/24 17:14, Tao Liu wrote:
> Hi YAMAZAKI & Kazu,
>
> Thanks for Kazu's suggestion on the v1, and thank you for reviewing
> and ack the patch!
>
> Thanks,
> Tao Liu
>
> On Fri, Oct 24, 2025 at 8:20 PM YAMAZAKI MASAMITSU(山崎 真光)
> <yamazaki-msmt at nec.com> wrote:
>>
>> Liu
>>
>> Thanks your new patch.
>> I think the patche is better than before. So I ack this patch.
>>
>> As you pointed out, if exists Rust modules then processing for
>> dwarf occur infinite loop. This will add the function to the
>> stack and cause an error. I also have resarch this bug, but
>> cannot find the root cause.
>>
>> Therefore, I think it would be better not to support Rust now.
>> However, the cause should eventually be revealed.
>>
>> Acked-by: YAMAZAKI Masamitsu <yamazaki-msmt at nec.com>
>>
>> Thanks,
>> Masa
>>
>> On 2025/10/22 15:38, HAGIO KAZUHITO(萩尾 一仁) wrote:
>>> On 2025/10/21 7:24, 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 rust
>>>> CompileUnits, since currently we don't need to deal with rust symbols.
>>>>
>>>> Signed-off-by: Tao Liu <ltao at redhat.com>
>>>> Suggested-by: Kazuhito Hagio <k-hagio-ab at nec.com>
>>> For applying this 04/14 patch separately before the 1.7.8 release, with
>>> adding the following note to the man page:
>>>
>>> --- a/makedumpfile.8.in
>>> +++ b/makedumpfile.8.in
>>> @@ -80,6 +80,7 @@ nested loops to traverse and erase kernel data. --eppic requires
>>> can be built from makedumpfile source. Refer to
>>> \fBhttp://code.google.com/p/eppic/\fR to build eppic library \fBlibeppic.a\fR
>>> and for more information on writing eppic macros.
>>> +NOTE: currently Rust is not supported in this function.
>>> .PP
>>> To analyze the first kernel's memory usage, makedumpfile can refer to
>>> \fIVMCOREINFO\fR instead of \fIVMLINUX\fR. \fIVMCOREINFO\fR contains the first
>>>
>>>
>>> Acked-by: Kazuhito Hagio <k-hagio-ab at nec.com>
>>>
>>> Thanks,
>>> Kazu
>>>
>>>> ---
>>>> dwarf_info.c | 7 +++++++
>>>> 1 file changed, 7 insertions(+)
>>>>
>>>> diff --git a/dwarf_info.c b/dwarf_info.c
>>>> index a3a2fd6..14cf7ca 100644
>>>> --- a/dwarf_info.c
>>>> +++ b/dwarf_info.c
>>>> @@ -1007,6 +1007,13 @@ get_debug_info(void)
>>>> ERRMSG("Can't get CU die.\n");
>>>> goto out;
>>>> }
>>>> +
>>>> + /* NOTE: currently Rust is not supported. */
>>>> + if (dwarf_srclang(&cu_die) == DW_LANG_Rust) {
>>>> + off = next_off;
>>>> + continue;
>>>> + }
>>>> +
>>>> search_die_tree(&cu_die, &found);
>>>> if (found)
>>>> break;
More information about the kexec
mailing list