Skip to content

Infinite recursion in TypeFormatterForModule::emit_type #61

@Swatinem

Description

@Swatinem

It looks like we get some new customer pdb files that exhibit some infinite / mutual recursion that looks like this:


13  symbolicator                    0x555cbf11f67d      [inlined] pdb_addr2line::type_formatter::TypeFormatterForModule::emit_type_inner (type_formatter.rs:1130)
14  symbolicator                    0x555cbf11f67d      pdb_addr2line::type_formatter::TypeFormatterForModule::emit_type (type_formatter.rs:1105)
15  symbolicator                    0x555cbf11ee5a      pdb_addr2line::type_formatter::TypeFormatterForModule::emit_type_index (type_formatter.rs:1091)
16  symbolicator                    0x555cbf11e61d      pdb_addr2line::type_formatter::TypeFormatterForModule::emit_arg_list (type_formatter.rs:996)
17  symbolicator                    0x555cbf11f67d      [inlined] pdb_addr2line::type_formatter::TypeFormatterForModule::emit_type_inner (type_formatter.rs:1130)
18  symbolicator                    0x555cbf11f67d      pdb_addr2line::type_formatter::TypeFormatterForModule::emit_type (type_formatter.rs:1105)
19  symbolicator                    0x555cbf11ee5a      pdb_addr2line::type_formatter::TypeFormatterForModule::emit_type_index (type_formatter.rs:1091)
20  symbolicator                    0x555cbf11e61d      pdb_addr2line::type_formatter::TypeFormatterForModule::emit_arg_list (type_formatter.rs:996)

This then repeats for a long time and eventually crashes in alloc::vec::Vec<T>::with_capacity (mod.rs:483) and finally in jemalloc. Its a bit weird that we get a SIGSEGV / SEGV_ACCERR instead of an allocation panic, but here we are 🤷🏻‍♂️

I wasn’t able yet to figure out what symbol is causing this however.

Though I remember I was suggesting a general recursion / memory usage limit that is being checked for so that we do not run into things like this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions