Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[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 rust-lang/unsafe-code-guidelines#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>
- Loading branch information