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

Catch potential panics produced by resource owner changed callback #1445

Merged
merged 1 commit into from
Feb 25, 2022

Conversation

turbolent
Copy link
Member

Description

Just noticed that the resource owner change callback was missing a wrapPanic, like all other runtime interface calls have.


  • Targeted PR against master branch
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work
  • Code follows the standards mentioned here
  • Updated relevant documentation
  • Re-reviewed Files changed in the Github PR explorer
  • Added appropriate labels

@codecov-commenter
Copy link

Codecov Report

Merging #1445 (56ceb7c) into master (7a379bb) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1445   +/-   ##
=======================================
  Coverage   72.65%   72.65%           
=======================================
  Files         288      288           
  Lines       39301    39303    +2     
=======================================
+ Hits        28554    28557    +3     
+ Misses       9258     9257    -1     
  Partials     1489     1489           
Flag Coverage Δ
unittests 72.65% <100.00%> (+<0.01%) ⬆️

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

Impacted Files Coverage Δ
runtime/runtime.go 85.42% <100.00%> (+0.01%) ⬆️
runtime/sema/simple_type.go 96.42% <0.00%> (+3.57%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7a379bb...56ceb7c. Read the comment docs.

@github-actions
Copy link

Cadence Benchstat comparison

This branch with compared with the base branch onflow:master commit 7a379bb
The command for i in {1..N}; do go test ./... -run=XXX -bench=. -shuffle=on; done was used.
Bench tests were run a total of 7 times on each branch.

Results

old.txtnew.txt
time/opdelta
CheckContractInterfaceFungibleTokenConformance-2149µs ± 3%154µs ± 5%+3.76%(p=0.026 n=7+7)
RuntimeResourceDictionaryValues-215.7ms ± 5%16.1ms ± 3%~(p=0.053 n=7+7)
RuntimeFungibleTokenTransfer-21.30ms ±28%1.21ms ±27%~(p=0.805 n=7+7)
ParseFungibleToken-2211µs ± 4%214µs ± 1%~(p=0.710 n=7+7)
ParseInfix-29.73µs ± 6%9.89µs ± 7%~(p=0.456 n=7+7)
ParseArray-215.4ms ± 6%16.0ms ± 9%~(p=0.209 n=7+7)
ParseDeploy/byte_array-226.0ms ±13%25.9ms ± 3%~(p=0.731 n=7+6)
ParseDeploy/decode_hex-21.34ms ± 3%1.37ms ± 4%~(p=0.181 n=6+7)
QualifiedIdentifierCreation/One_level-22.67ns ± 4%2.73ns ± 2%~(p=0.073 n=7+7)
QualifiedIdentifierCreation/Three_levels-2162ns ± 3%163ns ± 2%~(p=0.867 n=7+6)
ContractInterfaceFungibleToken-246.3µs ±12%45.9µs ± 4%~(p=0.731 n=7+6)
NewInterpreter/new_interpreter-21.23µs ± 3%1.24µs ± 4%~(p=0.594 n=7+7)
NewInterpreter/new_sub-interpreter-22.46µs ± 3%2.48µs ± 3%~(p=0.861 n=6+7)
InterpretRecursionFib-22.69ms ± 6%2.67ms ± 2%~(p=1.000 n=7+7)
 
alloc/opdelta
RuntimeResourceDictionaryValues-24.05MB ± 0%4.05MB ± 0%~(p=0.456 n=7+7)
RuntimeFungibleTokenTransfer-2271kB ± 0%271kB ± 0%~(p=0.710 n=7+7)
QualifiedIdentifierCreation/One_level-20.00B 0.00B ~(all equal)
QualifiedIdentifierCreation/Three_levels-264.0B ± 0%64.0B ± 0%~(all equal)
ContractInterfaceFungibleToken-226.6kB ± 0%26.6kB ± 0%~(p=0.592 n=7+7)
CheckContractInterfaceFungibleTokenConformance-266.2kB ± 0%66.2kB ± 0%~(all equal)
NewInterpreter/new_interpreter-2768B ± 0%768B ± 0%~(all equal)
NewInterpreter/new_sub-interpreter-21.24kB ± 0%1.24kB ± 0%~(all equal)
InterpretRecursionFib-21.24MB ± 0%1.24MB ± 0%~(all equal)
 
allocs/opdelta
RuntimeResourceDictionaryValues-2102k ± 0%102k ± 0%~(p=0.240 n=7+7)
RuntimeFungibleTokenTransfer-24.51k ± 0%4.51k ± 0%~(p=0.869 n=7+7)
QualifiedIdentifierCreation/One_level-20.00 0.00 ~(all equal)
QualifiedIdentifierCreation/Three_levels-22.00 ± 0%2.00 ± 0%~(all equal)
ContractInterfaceFungibleToken-2458 ± 0%458 ± 0%~(all equal)
CheckContractInterfaceFungibleTokenConformance-21.07k ± 0%1.07k ± 0%~(all equal)
NewInterpreter/new_interpreter-212.0 ± 0%12.0 ± 0%~(all equal)
NewInterpreter/new_sub-interpreter-238.0 ± 0%38.0 ± 0%~(all equal)
InterpretRecursionFib-225.0k ± 0%25.0k ± 0%~(all equal)
 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants