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
Make -fsanitize-debug-trap-reasons= a parameterized flag that takes
either `none`, `basic`, or `detailed`.
The old boolean flags are included for compatibility and are aliases of
the new flag.
The `basic` mode is the behavior that existed before this patch, and
`detailed` is the newer more expressive trap reasons.
Copy file name to clipboardExpand all lines: clang/docs/ReleaseNotes.rst
+19-9Lines changed: 19 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -141,14 +141,22 @@ Non-comprehensive list of changes in this release
141
141
142
142
- Added ``__builtin_elementwise_minnumnum`` and ``__builtin_elementwise_maxnumnum``.
143
143
144
-
- Trapping UBSan (e.g. ``-fsanitize-trap=undefined``) now emits a string describing the reason for
145
-
trapping into the generated debug info. This feature allows debuggers (e.g. LLDB) to display
146
-
the reason for trapping if the trap is reached. The string is currently encoded in the debug
147
-
info as an artificial frame that claims to be inlined at the trap location. The function used
148
-
for the artificial frame is an artificial function whose name encodes the reason for trapping.
149
-
The encoding used is currently the same as ``__builtin_verbose_trap`` but might change in the future.
150
-
This feature is enabled by default but can be disabled by compiling with
151
-
``-fno-sanitize-annotate-debug-info-traps``.
144
+
- Trapping UBSan (e.g. ``-fsanitize-trap=undefined``) now emits a string
145
+
describing the reason for trapping into the generated debug info. This feature
146
+
allows debuggers (e.g. LLDB) to display the reason for trapping if the trap is
147
+
reached. The string is currently encoded in the debug info as an artificial
148
+
frame that claims to be inlined at the trap location. The function used for
149
+
the artificial frame is an artificial function whose name encodes the reason
150
+
for trapping. The encoding used is currently the same as
151
+
``__builtin_verbose_trap`` but might change in the future. This feature is
152
+
enabled by default but can be disabled by compiling with
153
+
``-fno-sanitize-debug-trap-reasons``. The feature has a ``basic`` and
154
+
``detailed`` mode (the default). The ``basic`` mode emits a hard-coded string
155
+
per trap kind (e.g. integer overflow) and the ``detailed`` mode emits a more
156
+
descriptive string describing each individual trap. The ``detailed`` mode
157
+
produces larger debug info than ``basic`` but is more helpful for debugging.
158
+
The ``-fsanitize-debug-trap-reasons=`` flag can be used to switch between the
159
+
different modes.
152
160
153
161
- ``__builtin_elementwise_max`` and ``__builtin_elementwise_min`` functions for integer types can
154
162
now be used in constant expressions.
@@ -185,7 +193,9 @@ Non-comprehensive list of changes in this release
185
193
186
194
New Compiler Flags
187
195
------------------
188
-
- 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``).
196
+
- 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``).
197
+
- 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``).
ENUM_CODEGENOPT(SanitizeDebugTrapReasons, SanitizeDebugTrapReasonKind, 2, SanitizeDebugTrapReasonKind::Detailed, Benign) ///< Control how "trap reasons" are emitted in debug info
311
311
CODEGENOPT(SimplifyLibCalls , 1, 1, Benign) ///< Set when -fbuiltin is enabled.
0 commit comments