Comments (3)
I can see the result of this being undefined in the sense that the padding bytes could be any value. I don't expect in practice this would cause real problems such as an actual crash.
This function is very much meant for low-level work with data (like memcpy of structs to GPU memory) and potentially having junk in the padding bytes would be acceptable and expected behavior.
from rafx.
It's true that it is hard to cause to crash here. But from perspective of safety, undefined behavior is not allowed to happen in safe function anyway. From the concept of the programming language, this function should be declared as unsafe
.
from rafx.
As noted in the readme, this project does not follow typical guidance for the usage of unsafe. (https://github.com/aclysma/rafx#safety)
from rafx.
Related Issues (20)
- Investigate replacing `fnv` with `rustc-hash` for hash maps
- Skip "deduplication" code in frame packet building logic when possible
- Questions About Project HOT 2
- Runtime API Selection HOT 2
- Confusing `rafx_visibility` and `rafx_framework::visiblity` exported as `rafx::visibility` HOT 3
- Is Bincode The Best Serialization Format for Cooked Shader Packages? HOT 1
- Tag The 0.0.13 Release HOT 1
- crash when rendering wireframe with vulkan backend
- Unresolved import `ash::version` HOT 3
- Panic: Unable to load create_debug_utils_messenger_ext HOT 7
- Webgpu support HOT 1
- Composite alpha flag and transparent window HOT 2
- Demo won't run, stuck on "blocked waiting for asset to resolve demo font handle" HOT 2
- crash when running demo in Linux HOT 15
- Make distill optional in the higher level crates, abstract asset handling. HOT 1
- New crate.io release HOT 4
- Add `rafx-dynamic` feature/crate for dynamic linking HOT 2
- Support for MoltenVK in Vulkan 1.3.x SDKs HOT 5
- Framework vulkan RenderGraph misses layout transition from attachment to present_khr if no renderpass callback is registered HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rafx.