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

Inline stacks for rust standard library seem to be missing #464

Open
jrmuizel opened this issue Sep 9, 2022 · 4 comments
Open

Inline stacks for rust standard library seem to be missing #464

jrmuizel opened this issue Sep 9, 2022 · 4 comments

Comments

@jrmuizel
Copy link

jrmuizel commented Sep 9, 2022

See https://crash-stats.mozilla.org/report/index/ae968262-7b1b-4835-885e-39b4d0220909

The crash report has alloc::alloc::handle_alloc_error() being called by cert_storage::load_crlite_stash_from_reader_into_map(..) but load_crlite_stash_from_reader_into_map doesn't call handle_alloc_error. There should be some frames from Vec there instead.

@jrmuizel
Copy link
Author

jrmuizel commented Sep 9, 2022

This is a counter example where we do get some inline stacks from the standard library:
https://crash-stats.mozilla.org/report/index/413609a1-8c3a-42b1-8897-89cf70220909

@mstange
Copy link
Collaborator

mstange commented Sep 14, 2022

For future reference, this is at 0x4cb7f02 in xul.pdb E0D4358DF1F2276F4C4C44205044422E1.

pdb-addr2line also doesn't have the frames from Vec:

% pdb-addr2line -pCfi -e /Users/mstange/Downloads/xul.pdb 0x0000000004cb7f02
cert_storage::load_crlite_stash_from_reader_into_map(ref_mut$<dyn$<std::io::Read> >, std::collections::hash::map::HashMap<alloc::vec::Vec<u8,alloc::alloc::Global>,std::collections::hash::set::HashSet<alloc::vec::Vec<u8,alloc::alloc::Global>,std::collections::hash::map::RandomState>,std::collections::hash::map::RandomState>*) at /builds/worker/checkouts/gecko/security/manager/ssl/cert_storage/src/lib.rs:1193

The line is using the vec![] macro. Do you know what that macro expands to? Maybe they copied the oom check right into the macro, though that seems unlikely.

@jrmuizel
Copy link
Author

It seems to expand to $crate::vec::from_elem($elem, $n)

@mstange
Copy link
Collaborator

mstange commented Sep 15, 2022

Ok, so I would have expected the compiler to generate debug info that says that we're in that function. I'm not sure why it didn't.

Let's wait for this problem to show up again before we spend more time on it.

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