Closed Lorak-mmk closed 1 year ago
it is not obvious from the documentation what will happen if it gets a null pointer as a destination location
Documentation states it is undefined behavior.
cppdriver also doesn't check for null outputs and would also exhibit UB in that case, so there is no regression on that front. I can add null checks, but it would be just a hardening measure, not required for corectness of this project.
Creating a reference to uninitialized data is most of the time undefined behaviour in Rust - even if data under this reference is never read.
This commit removes all occurences of this problem (in accordance with cpp-driver's semantics), instead using
std::ptr::write
- safer and more explicit way to achieve the same goal.Pre-review checklist
.github/workflows/build.yml
ingtest_filter
..github/workflows/cassandra.yml
ingtest_filter
.