-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: use less fragile method for rodata segment init
Previous to this commit, we were expecting the rodata segments to be encoded in a specific order, and placed on the advice stack before anything else. With this commit, we now simply expect to the advice map to contain each segment keyed by its commitment hash, which we then move to the advice stack on demand, and immediately pipe to memory. This means the order of the segments no longer matters, and the advice stack is not sensitive to codegen changes or other influences which might perturb the advice stack or otherwise disrupt our assumptions. It also sets the stage for us to be able to initialize rodata after a context switch, as at that point the advice stack will be in an unknown condition, and using the advice map gives us certainty that we can arrange to have exactly what we need on the advice stack, when we need it. Additionally, I've updated the `midenc debug` input config file, as well as the usage documentation to reflect this. The last related change to this, will be emitting the rodata segments to disk in a convenient form, so that when the compiler emits the program, it also emits the segments alongside it, making it convenient to run the debugger against that program (or via the VM directly).
- Loading branch information
Showing
5 changed files
with
216 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.