Skip to content

Soundness: Monomorphization #295

Description

@danielsn

Like C++, Rust handles generic types by “monomorphizing” the code that uses them. The Rust compiler performs monomorphization in the llvm backend, which we do not have access to in RMC. We solved this by taking a fork of the llvm monomorphizer, but there is no guarantee that the RMC monomorphizer will stay in sync with the standard one from the Rust compiler

Likelihood

We do not know of any bugs that are currently caused by this, but divergence is likely to occur as the Rust compiler evolves.

Mitigation

  • We have regression tests that use generic types.

Path to soundness

  • Work with the Rust compiler team to move monomorphization into a generic module we can use.

Documentation

Metadata

Metadata

Assignees

Labels

[F] SoundnessKani failed to detect an issue

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions