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
ERROR:bindgen::codegen::struct_layout:Calculated wrong layout forSchedulerGroup, too more 8 bytes
/* automatically generated by rust-bindgen */
#[repr(C)]
pub structLinkedListElement{pubnext:*mutLinkedListElement,pubprev:*mutLinkedListElement,pubisSentinel:bool,}#[repr(C)]pubstructSchedulerGroup__bindgen_vtable(::std::os::raw::c_void);#[repr(C)]pubstructSchedulerGroup{pubvtable_:*constSchedulerGroup__bindgen_vtable,pub_base:LinkedListElement,pubisRunning:bool,pubeventCount:::std::os::raw::c_ulong,pubtargets:[*mut::std::os::raw::c_void;8usize],pubthreads:[*mut::std::os::raw::c_void;8usize],}#[test]fnbindgen_test_layout_SchedulerGroup(){assert_eq!(::std::mem::size_of::<SchedulerGroup>(),168usize,
concat!("Size of: ", stringify!(SchedulerGroup)));assert_eq!(::std::mem::align_of::<SchedulerGroup>(),8usize,
concat!("Alignment of ", stringify!(SchedulerGroup)));assert_eq!(unsafe{&(*(0as*constSchedulerGroup)).isRunning as*const _ asusize},25usize,
concat!("Alignment of field: ",
stringify!(SchedulerGroup),"::",
stringify!(isRunning)));assert_eq!(unsafe{&(*(0as*constSchedulerGroup)).eventCount as*const _ asusize},32usize,
concat!("Alignment of field: ",
stringify!(SchedulerGroup),"::",
stringify!(eventCount)));assert_eq!(unsafe{&(*(0as*constSchedulerGroup)).targets as*const _ asusize},40usize,
concat!("Alignment of field: ",
stringify!(SchedulerGroup),"::",
stringify!(targets)));assert_eq!(unsafe{&(*(0as*constSchedulerGroup)).threads as*const _ asusize},104usize,
concat!("Alignment of field: ",
stringify!(SchedulerGroup),"::",
stringify!(threads)));}#[test]fn__bindgen_test_layout_LinkedListElement_open0_SchedulerGroup_close0_instantiation(){assert_eq!(::std::mem::size_of::<LinkedListElement>(),24usize,
concat!("Size of template specialization: ",
stringify!(LinkedListElement)));assert_eq!(::std::mem::align_of::<LinkedListElement>(),8usize,
concat!("Alignment of template specialization: ",
stringify!(LinkedListElement)));}
Expected Results
There should not be an error about the incorrect layout of SchedulerGroup; bindgen has failed to take into account that isRunning will be packed into the unused space of LinkedListElement. The generated test for the layout of SchedulerGroup will also fail as a result of this.
The text was updated successfully, but these errors were encountered:
Input C/C++ Header
Bindgen Invocation
Actual Results
Expected Results
There should not be an error about the incorrect layout of
SchedulerGroup
;bindgen
has failed to take into account thatisRunning
will be packed into the unused space ofLinkedListElement
. The generated test for the layout ofSchedulerGroup
will also fail as a result of this.The text was updated successfully, but these errors were encountered: