|
|
@@ -34,7 +34,7 @@ SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
|
- [Trivially required initialization, with no escape hatch](#trivially-required-initialization-with-no-escape-hatch)
|
|
|
- [Initialize on all branches prior to use (Rust, C#, TypeScript)](#initialize-on-all-branches-prior-to-use-rust-c-typescript)
|
|
|
- [Definitive initialization (Swift)](#definitive-initialization-swift)
|
|
|
- - [C/C++ uninitialized](#cc-uninitialized)
|
|
|
+ - [C and C++ uninitialized](#c-and-c-uninitialized)
|
|
|
- [Allow passing unformed objects to parameters or returning them?](#allow-passing-unformed-objects-to-parameters-or-returning-them)
|
|
|
- [Allow assigning an unformed object to another unformed object?](#allow-assigning-an-unformed-object-to-another-unformed-object)
|
|
|
- [Fully destructive move (Rust)](#fully-destructive-move-rust)
|
|
|
@@ -725,7 +725,7 @@ Disadvantages:
|
|
|
- Would still need a semantic model for moved from objects which would
|
|
|
introduce some amount of additional complexity.
|
|
|
|
|
|
-### C/C++ uninitialized
|
|
|
+### C and C++ uninitialized
|
|
|
|
|
|
We could pursue the same approach as C and C++ here. However, this path has
|
|
|
proven to have severe problems. It has inevitably resulted in prevalent bugs and
|
|
|
@@ -734,8 +734,8 @@ variables in the language makes teaching the debug build to catch these bugs
|
|
|
extremely difficult and potentially impossible. We essentially will need
|
|
|
developers to heavily use an MSan-like mode (either by integrating it with the
|
|
|
debug build or having a separate one) in order to cope with the bugs caused by
|
|
|
-uninitialized memory. This is the only thing that has allowed coping with C/C++
|
|
|
-semantics here and even it is not very effective.
|
|
|
+uninitialized memory. This is the only thing that has allowed coping with C and
|
|
|
+C++ semantics here and even it is not very effective.
|
|
|
|
|
|
If MSan remains a separate tool that needs propagation and origin tracking
|
|
|
([details](https://research.google.com/pubs/archive/43308.pdf)), the cost and
|