Fix restoration of stack address after invoking function with struct-typed arguments #333
No reviewers
Labels
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: M-Labs/nac3#333
Loading…
Reference in New Issue
No description provided.
Delete Branch "issue-233"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This PR places all
alloca
s of struct arguments to the beginning of the function to prevent the stack pointer from permanently increasing after the function call returns.The debug location changes are necessary as using
gen_var
will cause the debug location to be lost, causing the inlining pass to fail withinlinable function call in a function with debug info must have a !dbg location
.Fixes #233.
@ -53,1 +53,4 @@
def dbg_stack_address(x):
i = 0
return uint64(id(i))
This expression with id doesn't make sense. Just exclude this test from the interpreter runs, or just return 0.
c9ef09cc48
toc7de22287e
v2: Changed Python implementation of
dbg_stack_address
to 0.