diff options
author | Casper <casperneo@uchicago.edu> | 2021-04-26 19:28:25 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-26 19:28:25 -0400 |
commit | c87179e73ed568183f8bf94468f5703886e0e6fb (patch) | |
tree | c9e98d980658ce4952587112e0c239af64203ea9 /reflection/reflection.fbs | |
parent | c24031c36bebd20f39c3237b4481e5604a9f0da9 (diff) | |
download | flatbuffers-c87179e73ed568183f8bf94468f5703886e0e6fb.tar.gz flatbuffers-c87179e73ed568183f8bf94468f5703886e0e6fb.tar.bz2 flatbuffers-c87179e73ed568183f8bf94468f5703886e0e6fb.zip |
Rust Remove SafeSliceAccess for Arrays, and fix miri. (#6592)
* Fix Miri flag passing and bump Rust version.
* Fix Miri problems from Arrays PR.
SafeSliceAccess was removed for Arrays. It's kind of unsound.
It has two properties:
1. EndianSafe
2. Alignment 1
We only need 1. in create_vector_direct to memcpy data.
We both 1. and 2. for accessing things with slices as buffers are built on &[u8]
which is unaligned. Conditional compilation implements
SafeSliceAccess for >1byte scalars (like f32) on LittleEndian machines
which is wrong since they don't satisfy 2.
This UB is still accessible for Vectors (though not exercised our
tests) as it implements SafeSliceAccess. I'll fix this later by
splitting SafeSliceAccess into its 2 properties.
Co-authored-by: Casper Neo <cneo@google.com>
Diffstat (limited to 'reflection/reflection.fbs')
0 files changed, 0 insertions, 0 deletions