Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Infinite recursion in TypeFormatterForModule::emit_type #61

Open
Swatinem opened this issue Jun 13, 2023 · 1 comment
Open

Infinite recursion in TypeFormatterForModule::emit_type #61

Swatinem opened this issue Jun 13, 2023 · 1 comment

Comments

@Swatinem
Copy link

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.

@mstange
Copy link
Owner

mstange commented Jun 18, 2023

I'd be happy to accept a PR which adds a recursion limit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants