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

Dead code elimination removes stack allocated structures incorrectly #16

Open
uxmal opened this issue Aug 1, 2015 · 1 comment
Open
Labels
bug This issue describes a defect in Reko local-stack-variables This issue is about incorrect propagation/elimination of local stack variables

Comments

@uxmal
Copy link
Owner

uxmal commented Aug 1, 2015

The following code fragment

Foo_struct_t s;
s.x = 3;
bar (&stack_obj);

is decompiled to

fn0010000 (fp - 0x0000001C);

Dead code elimination removes the assignment because it can't prove that it is live. To fix this Reko must defer dead code elimination until type analysis determines what arguments the called function has and then that knowledge is propagated to the callee.

@uxmal uxmal added the bug This issue describes a defect in Reko label Feb 22, 2016
@uxmal
Copy link
Owner Author

uxmal commented Feb 22, 2016

This is proving to be a major work item. Following this on the analysis-development branch

@ptomin ptomin added the local-stack-variables This issue is about incorrect propagation/elimination of local stack variables label Dec 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue describes a defect in Reko local-stack-variables This issue is about incorrect propagation/elimination of local stack variables
Projects
None yet
Development

No branches or pull requests

2 participants