skia /
skia /
7c61f88422487b2a8efd180435490d57316472bb [rust png] Delete incorrect memory safety comments.
In the past I have assumed that the mere **existence** of a `&mut`
reference to uninitialized memory results in instant Undefined Behavior
(UB), even if there are no explicit reads in the code. This scenario
has been recently discussed in the internal chatroom about `unsafe` Rust
code (see https://chat.google.com/room/AAAAhLsgrQ4/Fx2naiaXbeU) where
https://github.com/rust-lang/unsafe-code-guidelines/issues/346 was
linked and where it seems that the consensus is to **not** treat `&mut
uninit` as immediate UB. On one hand the discussions are still ongoing,
but OTOH I don't want to make/spread safety notes that may very well be
incorrect and overly conservative. So, for now, let me delete the
related safety comments from `FFI.rs`.
Bug: chromium:356884491
Change-Id: Ica15532493dc0c35b12332df04306fe87be10d3e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/904956
Auto-Submit: Ćukasz Anforowicz <lukasza@google.com>
Commit-Queue: Daniel Dilan <danieldilan@google.com>
Reviewed-by: Daniel Dilan <danieldilan@google.com>
1 file changed