Skip to content

Commit 442c87b

Browse files
committed
Bug 1985509 - Update bindgen to fix overaligned types on x86. r=nika,supply-chain-reviewers,profiler-reviewers,canaltinova
Bindgen historically represented 8-byte aligned types with u64. That's borked in x86 where u64 is 4-byte aligned. I fixed this in upstream bindgen (rust-lang/rust-bindgen#3280), so update it. There are a few changes needed: * mozilla/neqo#2913 to deal with the now properly aligned type. * Similar change (less fun because transmute, but still sound) in the macos crash reporter. I could try to generate a bit easier to use bindings for 8-byte 8-byte-aligned blobs, but this would do. * Some opaque additions in layout/style/ServoBindings.toml and the profiler bindings. This is unrelated to the opaque change, but fallout from other bindgen improvements. In particular, layout tests now run at compile time, so this uncovered some layout mismatches on platforms where we don't run rusttests on CI. Differential Revision: https://phabricator.services.mozilla.com/D262840
1 parent 295c2e6 commit 442c87b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

style/gecko/snapshot_helpers.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ unsafe fn get_class_or_part_from_attr(attr: &structs::nsAttrValue) -> Class {
5858
.mAtomArray
5959
.as_ref();
6060
let array =
61-
(*attr_array).mArray.as_ptr() as *const structs::nsTArray<structs::RefPtr<nsAtom>>;
61+
(*attr_array).mArray.0.as_ptr() as *const structs::nsTArray<structs::RefPtr<nsAtom>>;
6262
return Class::More(&**array);
6363
}
6464
debug_assert_eq!(base_type, structs::nsAttrValue_ValueBaseType_eStringBase);

0 commit comments

Comments
 (0)