FFI related paper cuts in driver ↔ lint-crate communication #37
Labels
A-driver
Area: Driver or something related to the internal working of a driver.
C-tracking-issue
Category: Tracking issue
I-unsound
Issue: A part of the linter API that's unsound or uses undefined behavior
When I created the prototype, I hacked together a basic driver ↔ lint-crate communication. After reworking the communication and learning more about FFI stuff, it turns out that the current implementation is unsound. This is a collection of all issues that need to be fixed:
#[repr(C)]
types. These need to be replaced with FFI safe types or at least safely be transferred over the FFI boarderOption<>
,&str
&dyn Trait
pointers from the API#[repr(C)]
(Remove traits from stable interface #6)-Z randomize-layout
#28#[repr(C)]
type in#[repr(C)]
struct rust-lang/rust-clippy#9357marker_api::LintPass::registered_lints
returnsBox<[..]>
which is not FFI safeNote: We can change
#[repr(C)]
to a different ABI as long as it's stable like CThe text was updated successfully, but these errors were encountered: