bevy/crates/bevy_ecs/src/system
Joseph 58f7dac689
Fix unsoundness in QueryState::is_empty (#9463)
# Objective

`QueryState::is_empty` is unsound, as it does not validate the world. If
a mismatched world is passed in, then the query filter may cast a
component to an incorrect type, causing undefined behavior.

## Solution

Add world validation. To prevent a performance regression in `Query`
(whose world does not need to be validated), the unchecked function
`is_empty_unsafe_world_cell` has been added. This also allows us to
remove one of the last usages of the private function
`UnsafeWorldCell::unsafe_world`, which takes us a step towards being
able to remove that method entirely.
2023-09-02 23:43:22 +00:00
..
commands Allow disjoint mutable world access via EntityMut (#9419) 2023-08-28 23:30:59 +00:00
adapter_system.rs Add system.map(...) for transforming the output of a system (#8526) 2023-08-28 16:36:46 +00:00
combinator.rs Move schedule name into Schedule (#9600) 2023-08-28 20:44:48 +00:00
exclusive_function_system.rs Document every public item in bevy_ecs (#8731) 2023-06-10 23:23:48 +00:00
exclusive_system_param.rs Document every public item in bevy_ecs (#8731) 2023-06-10 23:23:48 +00:00
function_system.rs Migrate the rest of the engine to UnsafeWorldCell (#8833) 2023-06-15 01:31:56 +00:00
mod.rs Move schedule name into Schedule (#9600) 2023-08-28 20:44:48 +00:00
query.rs Fix unsoundness in QueryState::is_empty (#9463) 2023-09-02 23:43:22 +00:00
system_param.rs Move schedule name into Schedule (#9600) 2023-08-28 20:44:48 +00:00
system.rs Improve various Debug implementations (#9588) 2023-08-26 21:27:41 +00:00