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

Compiler intrinsics #312

Closed
1 task done
danielsn opened this issue Jul 8, 2021 · 2 comments
Closed
1 task done

Compiler intrinsics #312

danielsn opened this issue Jul 8, 2021 · 2 comments
Labels
[C] Internal Tracks some internal work. I.e.: Users should not be affected.
Milestone

Comments

@danielsn
Copy link
Contributor

danielsn commented Jul 8, 2021

Rust has hundreds of compiler intrinsics. Unlike most other MIR features, which are represented in the IR using enum types, Rust intrinsics are identified using strings. This makes it difficult to know if we support all required Rust intrinsics.

Also, some instrinsics have complicated semantics, which is not always well documented. It is possible that implementations for these intrinsics may not correctly represent the Rust semantics.

Likelihood:

RMC currently only supports a small fraction of Rust intrinsics.

Mitigation:

  • Raise a warning if RMC encounters code which uses unsupported intrinsics

Path to soundness:

Either document as as not supported, or add support.

Documentation:

@danielsn danielsn added this to the Soundness milestone Jul 8, 2021
@tedinski tedinski added the [F] Soundness Kani failed to detect an issue label Nov 8, 2022
@celinval
Copy link
Contributor

celinval commented Nov 9, 2022

@adpaco-aws, do you think we can close this issue? I believe we implement unsupported construct for any intrinsic that we don't support, right?

@celinval celinval added [C] Internal Tracks some internal work. I.e.: Users should not be affected. and removed [F] Soundness Kani failed to detect an issue T-Mitigated labels Nov 9, 2022
@celinval celinval changed the title Soundness: Compiler intrinsics [MITIGATED] Compiler intrinsics Nov 9, 2022
@adpaco-aws
Copy link
Contributor

@adpaco-aws, do you think we can close this issue? I believe we implement unsupported construct for any intrinsic that we don't support, right?

Yes, it works the same way as with any other unsupported feature: If an unsupported intrinsic is within the reachable code for verification, it will raise a failure.

In addition to this mechanism, we also have documentation reflecting the current status for each intrinsic.

Currently, we support a significant amount of compiler intrinsics (see #727, #1163, and #1148 for an up-to-date status). The models for these intrinsics go through a code review process which guarantees they are as accurate as possible. The same process is followed to add support for new intrinsics. Therefore, I don't think we need to keep this issue open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[C] Internal Tracks some internal work. I.e.: Users should not be affected.
Projects
None yet
Development

No branches or pull requests

4 participants