Skip to content

Challenge 7: make panicking part optional; remove mention of verifying intrinsics #357

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions doc/mdbook-metrics/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ edition = "2021"

[dependencies]
mdbook = { version = "^0.4" }
mdbook-linkcheck = "0.7.7"
serde_json = "1.0.132"
6 changes: 5 additions & 1 deletion doc/src/challenges/0007-atomic-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,14 +87,18 @@ Write and verify safety contracts for the unsafe functions:
- `atomic_umax`
- `atomic_umin`

##### Panicking (Optional)
Then, for each of the safe abstractions that invoke the unsafe functions listed above, write contracts that ensure that they are not invoked with `order`s that would cause panics.

For example, `atomic_store` panics if invoked with `Acquire` or `AcqRel` ordering.
In this case, you would write contracts on the safe `store` methods that enforce that they are not called with either of those `order`s.

This section is not required to complete the challenge, since panicking is not undefined behavior.
However, it would be incorrect for someone to call these functions with the wrong arguments, so we encourage providing these specifications.

#### Part 3: Atomic Intrinsics

Write and verify safety contracts for the intrinsics invoked by the unsafe functions from Part 2 (in `core::intrinsics`):
Write safety contracts for the intrinsics invoked by the unsafe functions from Part 2 (in `core::intrinsics`):

| Operations | Functions |
|-----------------------|-------------|
Expand Down
Loading