You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -30,11 +24,6 @@ For more information about Clang or LLVM, including information about the
30
24
latest release, please see the `Clang Web Site <https://clang.llvm.org>`_ or the
31
25
`LLVM Web Site <https://llvm.org>`_.
32
26
33
-
Note that if you are reading this file from a Subversion checkout or the
34
-
main Clang web page, this document applies to the *next* release, not
35
-
the current one. To see the release notes for a specific release, please
36
-
see the `releases page <https://llvm.org/releases/>`_.
37
-
38
27
What's New in Clang 8.0.0?
39
28
==========================
40
29
@@ -50,7 +39,38 @@ Major New Features
50
39
profile data captured for one version of a program to be applied
51
40
when building another version where symbols have changed (for
52
41
example, due to renaming a class or namespace).
53
-
See the :doc:`UsersManual` for details.
42
+
See the :ref:`UsersManual <profile_remapping>` for details.
43
+
44
+
- Clang has new options to initialize automatic variables with either a pattern or with zeroes. The default is still that automatic variables are uninitialized. This isn't meant to change the semantics of C and C++. Rather, it's meant to be a last resort when programmers inadvertently have some undefined behavior in their code. These options aim to make undefined behavior hurt less, which security-minded people will be very happy about. Notably, this means that there's no inadvertent information leak when:
45
+
46
+
* The compiler re-uses stack slots, and a value is used uninitialized.
47
+
48
+
* The compiler re-uses a register, and a value is used uninitialized.
49
+
50
+
* Stack structs / arrays / unions with padding are copied.
51
+
52
+
These options only address stack and register information leaks.
53
+
54
+
Caveats:
55
+
56
+
* Variables declared in unreachable code and used later aren't initialized. This affects goto statements, Duff's device, and other objectionable uses of switch statements. This should instead be a hard-error in any serious codebase.
57
+
58
+
* These options don't affect volatile stack variables.
59
+
60
+
* Padding isn't fully handled yet.
61
+
62
+
How to use it on the command line:
63
+
64
+
* ``-ftrivial-auto-var-init=uninitialized`` (the default)
There is also a new attribute to request a variable to not be initialized, mainly to disable initialization of large stack arrays when deemed too expensive:
0 commit comments