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

Add mc-sgx-panic crate for common panic handling #30

Merged
merged 1 commit into from
Jan 13, 2023

Conversation

nick-mobilecoin
Copy link
Collaborator

@nick-mobilecoin nick-mobilecoin commented Jan 10, 2023

This change is in preparation of the mc-sgx-sync crate, #29

In order to support Mutex poisoning there needs to be an implementation of panicking(), https://doc.rust-lang.org/src/std/sync/poison.rs.html#33
This panicking logic should probably be common such that it's not re-implemented for mc-sgx-panic-abort and mc-sgx-panic-log

It may be appropriate to only have mc-sgx-panic and then use features abort and log to specify the implementation to use. While features are inherently additive in Cargo it's not unheard of to use mutually exclusive features, https://doc.rust-lang.org/cargo/reference/features.html#mutually-exclusive-features

@codecov-commenter
Copy link

Codecov Report

Merging #30 (b4249a1) into panic-log (dfb54d8) will increase coverage by 0.09%.
The diff coverage is 100.00%.

@@              Coverage Diff              @@
##           panic-log      #30      +/-   ##
=============================================
+ Coverage      87.80%   87.90%   +0.09%     
=============================================
  Files              4        5       +1     
  Lines            123      124       +1     
=============================================
+ Hits             108      109       +1     
  Misses            15       15              
Impacted Files Coverage Δ
panic/src/lib.rs 100.00% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Contributor

@NotGyro NotGyro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good, simple introduction of a new crate

Copy link
Contributor

@samdealy samdealy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rust Pull requests that update rust code size/M Medium-sized PRs
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

5 participants