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

Coredumps: Allow truncating locals and operand stack vecs when all values are optimized away #210

Open
fitzgen opened this issue May 18, 2023 · 2 comments

Comments

@fitzgen
Copy link
Contributor

fitzgen commented May 18, 2023

In Wasmtime, we don't currently include locals or the operand stack in core dumps currently (although we intend to soon) and in fact have even lost all information about how many locals there were or the size of the operand stack. Therefore, we emit empty vecs for locals and the operand stack, rather than a vec of N missing values, because we don't even know N.

I think this is reasonable behavior for an optimizing compiler, but also something that we should probably explicitly document as acceptable so that coredump-consuming tools are given a heads up and consider this case.

I wanted to bounce this off folks before making a PR adding such language.

Thoughts?

cc @xtuc @dschuff @itsrainy

@xtuc
Copy link
Contributor

xtuc commented May 18, 2023

I think it's acceptable to use an empty vector for missing/truncated locals, a debugger can refer to the source WebAssembly module for number/types of locals. Works with stack as well but has to be computed.

@dschuff
Copy link
Member

dschuff commented May 18, 2023

Yeah, this makes sense to me too.

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

3 participants