You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think this is fixable by just turning the def::DefTy(..) pattern in check_def to def::DefTy(..) | def::DefStruct(..). Patch for this and #19834 incoming.
huonw
added
A-lints
Area: Lints (warnings about flaws in source code) such as unused_mut.
A-FFI
Area: Foreign function interface (FFI)
labels
Dec 21, 2014
tomjakubowski
changed the title
improper_ctypes lint doesn't detect cross-crate un-ffi-safe types
improper_ctypes lint doesn't detect cross-crate un-ffi-safe structs
Dec 24, 2014
It now checks extern fns in addition to foreign fns and checks `DefStruct`
defs as well.
There is room for improvement: for example, I believe that pointers
should be safe in extern fn signatures regardless of the pointee's
representation.
The `FIXME` on `rust_begin_unwind_fmt` is because I don't think it
should be, or needs to be, C ABI (cc @eddyb) and it takes a problematic
`fmt::Arguments` structure by value.
Fixrust-lang#20098, fixrust-lang#19834
This and #19834 are still serious and might be masking bugs in programs exporting a native interface. I'll see if I can revive my PR from a few months ago.
For example, it accepts this:
Even though
String
is not FFI safe.The text was updated successfully, but these errors were encountered: