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
Copy file name to clipboardExpand all lines: clang/docs/ReleaseNotes.rst
+24-9Lines changed: 24 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -139,14 +139,27 @@ Non-comprehensive list of changes in this release
139
139
140
140
- Added ``__builtin_elementwise_minnumnum`` and ``__builtin_elementwise_maxnumnum``.
141
141
142
-
- Trapping UBSan (e.g. ``-fsanitize-trap=undefined``) now emits a string describing the reason for
143
-
trapping into the generated debug info. This feature allows debuggers (e.g. LLDB) to display
144
-
the reason for trapping if the trap is reached. The string is currently encoded in the debug
145
-
info as an artificial frame that claims to be inlined at the trap location. The function used
146
-
for the artificial frame is an artificial function whose name encodes the reason for trapping.
147
-
The encoding used is currently the same as ``__builtin_verbose_trap`` but might change in the future.
148
-
This feature is enabled by default but can be disabled by compiling with
149
-
``-fno-sanitize-annotate-debug-info-traps``.
142
+
- Trapping UBSan (e.g. ``-fsanitize=undefined -fsanitize-trap=undefined``) now
143
+
emits a string describing the reason for trapping into the generated debug
144
+
info. This feature allows debuggers (e.g. LLDB) to display the reason for
145
+
trapping if the trap is reached. The string is currently encoded in the debug
146
+
info as an artificial frame that claims to be inlined at the trap location.
147
+
The function used for the artificial frame is an artificial function whose
148
+
name encodes the reason for trapping. The encoding used is currently the same
149
+
as ``__builtin_verbose_trap`` but might change in the future. This feature is
150
+
enabled by default but can be disabled by compiling with
151
+
``-fno-sanitize-debug-trap-reasons``. The feature has a ``basic`` and
152
+
``detailed`` mode (the default). The ``basic`` mode emits a hard-coded string
153
+
per trap kind (e.g. ``Integer addition overflowed``) and the ``detailed`` mode
154
+
emits a more descriptive string describing each individual trap (e.g. ``signed
155
+
integer addition overflow in 'a + b'``). The ``detailed`` mode produces larger
156
+
debug info than ``basic`` but is more helpful for debugging. The
157
+
``-fsanitize-debug-trap-reasons=`` flag can be used to switch between the
158
+
different modes or disable the feature entirely. Note due to trap merging in
159
+
optimized builds (i.e. in each function all traps of the same kind get merged
160
+
into the same trap instruction) the trap reasons might be removed. To prevent
161
+
this build without optimizations (i.e. use `-O0` or use the `optnone` function
162
+
attribute) or use the `fno-sanitize-merge=` flag in optimized builds.
150
163
151
164
- ``__builtin_elementwise_max`` and ``__builtin_elementwise_min`` functions for integer types can
152
165
now be used in constant expressions.
@@ -183,7 +196,9 @@ Non-comprehensive list of changes in this release
183
196
184
197
New Compiler Flags
185
198
------------------
186
-
- New option ``-fno-sanitize-annotate-debug-info-traps`` added to disable emitting trap reasons into the debug info when compiling with trapping UBSan (e.g. ``-fsanitize-trap=undefined``).
199
+
- New option ``-fno-sanitize-debug-trap-reasons`` added to disable emitting trap reasons into the debug info when compiling with trapping UBSan (e.g. ``-fsanitize-trap=undefined``).
200
+
- New option ``-fsanitize-debug-trap-reasons=`` added to control emitting trap reasons into the debug info when compiling with trapping UBSan (e.g. ``-fsanitize-trap=undefined``).
0 commit comments