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

Failed truncation of stack variables #681

Closed
vbgl opened this issue Jan 11, 2024 · 1 comment · Fixed by #848
Closed

Failed truncation of stack variables #681

vbgl opened this issue Jan 11, 2024 · 1 comment · Fixed by #848
Assignees
Labels
bug stack-allocation The compiler pass that handles stack & pointers
Milestone

Comments

@vbgl
Copy link
Member

vbgl commented Jan 11, 2024

Compilation of the following program crashes with:

"bug_681.jazz", line 6 (2-8):
compilation error in function load_small:
asmgen: invalid rexpr for oprd (32)[RSP + ((64u) 0)]
invalid Load size

It seems that stack-allocation emits wrong code.

export
fn load_small(reg u32 x) -> reg u16 {
  stack u32 s;
  reg u16 r;
  s = x;
  r = s;
  return r;
}
@vbgl vbgl added bug stack-allocation The compiler pass that handles stack & pointers labels Jan 11, 2024
@vbgl vbgl added this to the 2024.06.0 milestone May 28, 2024
@eponier
Copy link
Contributor

eponier commented Jun 5, 2024

I'm working on it, but the changes in the proofs are not that small, so I need some time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug stack-allocation The compiler pass that handles stack & pointers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants