bevy/crates/bevy_ecs/src
JoJoJet 3ac06b57e9 Respect alignment for zero-sized types stored in the world (#6618)
# Objective

Fixes #6615.

`BlobVec` does not respect alignment for zero-sized types, which results in UB whenever a ZST with alignment other than 1 is used in the world.

## Solution

Add the fn `bevy_ptr::dangling_with_align`.

---

## Changelog

+ Added the function `dangling_with_align` to `bevy_ptr`, which creates a well-aligned dangling pointer to a type whose alignment is not known at compile time.
2022-11-14 21:16:53 +00:00
..
entity Make Entity::to_bits const (#6559) 2022-11-12 16:15:04 +00:00
query debug_checked_unwrap should track its caller (#6452) 2022-11-05 16:15:08 +00:00
schedule Fix clippy::iter_with_drain (#6485) 2022-11-06 01:42:15 +00:00
storage Respect alignment for zero-sized types stored in the world (#6618) 2022-11-14 21:16:53 +00:00
system Improve logging consistency for entity despawning (#6501) 2022-11-07 19:23:34 +00:00
world Add send_event and friends to WorldCell (#6515) 2022-11-07 21:25:31 +00:00
archetype.rs Fix spawning empty bundles (#6425) 2022-11-03 22:50:41 +00:00
bundle.rs Fix spawning empty bundles (#6425) 2022-11-03 22:50:41 +00:00
change_detection.rs Implement IntoIterator for ECS wrapper types. (#5096) 2022-10-24 21:01:08 +00:00
component.rs Fix CI issues arising from use of Rust 1.64 (#6067) 2022-09-22 16:56:43 +00:00
event.rs Optimize use statement (#5992) 2022-09-15 17:05:09 +00:00
lib.rs Revert "Show prelude re-exports in docs (#6448)" (#6449) 2022-11-02 20:40:45 +00:00
reflect.rs Enable Constructing ReflectComponent/Resource (#6257) 2022-10-17 14:01:50 +00:00