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

cannon: Fix stack patching #11632

Merged
merged 7 commits into from
Aug 29, 2024
Merged

cannon: Fix stack patching #11632

merged 7 commits into from
Aug 29, 2024

Conversation

Inphi
Copy link
Contributor

@Inphi Inphi commented Aug 28, 2024

Fixes the base stack pointer of the op-program.
Also adds the memprofilerate=0 environment variable to all patched programs.

Setting memprofilerate avoids floating point operations within the Go runtime. We should be able to disable Go specific patches with this change, but this will be done on a later PR.

fixes: #11660

And add `memprofilerate=0` to envp
@Inphi Inphi requested a review from mbaxter August 28, 2024 19:31
@Inphi Inphi requested a review from a team as a code owner August 28, 2024 19:31
cannon/mipsevm/program/patch.go Outdated Show resolved Hide resolved
cannon/mipsevm/program/patch.go Show resolved Hide resolved
cannon/mipsevm/program/patch.go Outdated Show resolved Hide resolved
cannon/mipsevm/program/patch.go Outdated Show resolved Hide resolved
Copy link

codecov bot commented Aug 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 80.99%. Comparing base (36f093a) to head (8f7f22a).
Report is 1 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #11632      +/-   ##
===========================================
+ Coverage    80.81%   80.99%   +0.17%     
===========================================
  Files           32       32              
  Lines         2466     2473       +7     
===========================================
+ Hits          1993     2003      +10     
+ Misses         396      394       -2     
+ Partials        77       76       -1     
Flag Coverage Δ
cannon-go-tests 80.99% <100.00%> (+0.17%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
cannon/mipsevm/program/patch.go 83.92% <100.00%> (+8.41%) ⬆️

cannon/mipsevm/program/patch.go Show resolved Hide resolved
cannon/mipsevm/program/patch.go Outdated Show resolved Hide resolved
cannon/mipsevm/program/patch.go Outdated Show resolved Hide resolved
cannon/mipsevm/program/patch.go Outdated Show resolved Hide resolved
@Inphi Inphi enabled auto-merge August 29, 2024 02:09
@Inphi Inphi added this pull request to the merge queue Aug 29, 2024
Merged via the queue into develop with commit 0dcccf6 Aug 29, 2024
60 checks passed
@Inphi Inphi deleted the inphi/cannon-fix-stack branch August 29, 2024 02:50
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

Successfully merging this pull request may close these issues.

Offchain MTCannon: Clean up memprofile handling
3 participants