<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/libcxx/vendor, branch main</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/'/>
<entry>
<title>[libc++][hardening] Introduce assertion semantics. (#149459)</title>
<updated>2025-07-29T07:19:15+00:00</updated>
<author>
<name>Konstantin Varlamov</name>
<email>varconsteq@gmail.com</email>
</author>
<published>2025-07-29T07:19:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=3eee9fc2c4d1973904b1a26fa96a8c7473ef6a5e'/>
<id>3eee9fc2c4d1973904b1a26fa96a8c7473ef6a5e</id>
<content type='text'>
Assertion semantics closely mimic C++26 Contracts evaluation semantics.
This brings our implementation closer in line with C++26 Library Hardening
(one particular benefit is that using the `observe` semantic makes adopting
hardening easier for projects).</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Assertion semantics closely mimic C++26 Contracts evaluation semantics.
This brings our implementation closer in line with C++26 Library Hardening
(one particular benefit is that using the `observe` semantic makes adopting
hardening easier for projects).</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "[libc++][hardening] Introduce assertion semantics" (#148822)</title>
<updated>2025-07-15T10:43:37+00:00</updated>
<author>
<name>Nikolas Klauser</name>
<email>nikolasklauser@berlin.de</email>
</author>
<published>2025-07-15T10:43:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=339a1f2e8f5c8f6a55e3f801e55c659bd526956c'/>
<id>339a1f2e8f5c8f6a55e3f801e55c659bd526956c</id>
<content type='text'>
Reverts llvm/llvm-project#148268

It looks like this was based on #148266, which I reverted in #148787.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Reverts llvm/llvm-project#148268

It looks like this was based on #148266, which I reverted in #148787.</pre>
</div>
</content>
</entry>
<entry>
<title>[libc++][hardening] Introduce assertion semantics (#148268)</title>
<updated>2025-07-15T09:14:30+00:00</updated>
<author>
<name>Konstantin Varlamov</name>
<email>varconsteq@gmail.com</email>
</author>
<published>2025-07-15T09:14:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=7345508c6febc57eaac985ef2fb14beabdc4d461'/>
<id>7345508c6febc57eaac985ef2fb14beabdc4d461</id>
<content type='text'>
Assertion semantics closely mimic C++26 Contracts evaluation semantics.
This brings our implementation closer in line with C++26 Library
Hardening (one particular benefit is that using the `observe` semantic
makes adopting hardening easier for projects).</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Assertion semantics closely mimic C++26 Contracts evaluation semantics.
This brings our implementation closer in line with C++26 Library
Hardening (one particular benefit is that using the `observe` semantic
makes adopting hardening easier for projects).</pre>
</div>
</content>
</entry>
<entry>
<title>[libc++] Introduce the _LIBCPP_VERBOSE_TRAP macro (#148262)</title>
<updated>2025-07-14T13:56:19+00:00</updated>
<author>
<name>Konstantin Varlamov</name>
<email>varconsteq@gmail.com</email>
</author>
<published>2025-07-14T13:56:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=5951c44573203710901c6bdb06a382efbcc907fa'/>
<id>5951c44573203710901c6bdb06a382efbcc907fa</id>
<content type='text'>
Split out the calls to __builtin_verbose_trap into a separate header.
This is just a refactoring to make the code a bit more structured.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Split out the calls to __builtin_verbose_trap into a separate header.
This is just a refactoring to make the code a bit more structured.</pre>
</div>
</content>
</entry>
<entry>
<title>[libc++][C++03] Use `__cxx03/` headers in C++03 mode (#109002)</title>
<updated>2024-12-21T12:01:48+00:00</updated>
<author>
<name>Nikolas Klauser</name>
<email>nikolasklauser@berlin.de</email>
</author>
<published>2024-12-21T12:01:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=b9a2658a3e8bd13b0f9e7a8a440832a95b377216'/>
<id>b9a2658a3e8bd13b0f9e7a8a440832a95b377216</id>
<content type='text'>
This patch implements the forwarding to frozen C++03 headers as
discussed in
https://discourse.llvm.org/t/rfc-freezing-c-03-headers-in-libc. In the
RFC, we initially proposed selecting the right headers from the Clang
driver, however consensus seemed to steer towards handling this in the
library itself. This patch implements that direction.

At a high level, the changes basically amount to making each public
header look like this:

```
// inside &lt;vector&gt;
#ifdef _LIBCPP_CXX03_LANG
#  include &lt;__cxx03/vector&gt;
#else
  // normal &lt;vector&gt; content
#endif
```

In most cases, public headers are simple umbrella headers so there isn't
much code in the #else branch. In other cases, the #else branch contains
the actual implementation of the header.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch implements the forwarding to frozen C++03 headers as
discussed in
https://discourse.llvm.org/t/rfc-freezing-c-03-headers-in-libc. In the
RFC, we initially proposed selecting the right headers from the Clang
driver, however consensus seemed to steer towards handling this in the
library itself. This patch implements that direction.

At a high level, the changes basically amount to making each public
header look like this:

```
// inside &lt;vector&gt;
#ifdef _LIBCPP_CXX03_LANG
#  include &lt;__cxx03/vector&gt;
#else
  // normal &lt;vector&gt; content
#endif
```

In most cases, public headers are simple umbrella headers so there isn't
much code in the #else branch. In other cases, the #else branch contains
the actual implementation of the header.</pre>
</div>
</content>
</entry>
<entry>
<title>[libc++] Fix AppleClang version number when checking for __builtin_verbose_trap support (#110161)</title>
<updated>2024-09-27T12:53:02+00:00</updated>
<author>
<name>Louis Dionne</name>
<email>ldionne.2@gmail.com</email>
</author>
<published>2024-09-27T12:53:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=1eba87904b0cbaaee82cfdb835528b85d99320ef'/>
<id>1eba87904b0cbaaee82cfdb835528b85d99320ef</id>
<content type='text'>
We should have been checking against 1700, not 17000, which was a typo.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We should have been checking against 1700, not 17000, which was a typo.</pre>
</div>
</content>
</entry>
<entry>
<title>[libc++][NFC] Add comment about __builtin_verbose_trap per review comment</title>
<updated>2024-07-23T17:57:08+00:00</updated>
<author>
<name>Louis Dionne</name>
<email>ldionne.2@gmail.com</email>
</author>
<published>2024-07-23T17:57:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=1b60c38eee1485c01f60451d9e0ea75a6323ea0f'/>
<id>1b60c38eee1485c01f60451d9e0ea75a6323ea0f</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[libc++] Make libc++ forward-compatible with AppleClang's definition of __builtin_verbose_trap (#99529)</title>
<updated>2024-07-19T21:00:40+00:00</updated>
<author>
<name>Louis Dionne</name>
<email>ldionne.2@gmail.com</email>
</author>
<published>2024-07-19T21:00:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=ffda5212282b0b3ff943690738b314e3ac5254c3'/>
<id>ffda5212282b0b3ff943690738b314e3ac5254c3</id>
<content type='text'>
AppleClang as included in the Xcode 16 beta implements
`__builtin_verbose_trap`, but it implements slightly different semantics
from the ones implemented upstream. This patch makes libc++ compatible
with either definition until we drop support for the version of
AppleClang that differs from upstream.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
AppleClang as included in the Xcode 16 beta implements
`__builtin_verbose_trap`, but it implements slightly different semantics
from the ones implemented upstream. This patch makes libc++ compatible
with either definition until we drop support for the version of
AppleClang that differs from upstream.</pre>
</div>
</content>
</entry>
<entry>
<title>[libc++][hardening] Use `__builtin_verbose_trap` if it's available. (#84870)</title>
<updated>2024-07-12T19:06:25+00:00</updated>
<author>
<name>Konstantin Varlamov</name>
<email>varconsteq@gmail.com</email>
</author>
<published>2024-07-12T19:06:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=1e96b4ad00f54dfbe9c4b22a95bef5fed0203e07'/>
<id>1e96b4ad00f54dfbe9c4b22a95bef5fed0203e07</id>
<content type='text'>
Keep falling back to `__builtin_trap` on older versions of Clang.

Co-authored-by: Louis Dionne &lt;ldionne.2@gmail.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Keep falling back to `__builtin_trap` on older versions of Clang.

Co-authored-by: Louis Dionne &lt;ldionne.2@gmail.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[libc++][hardening] In production hardening modes, trap rather than abort (#78561)</title>
<updated>2024-01-19T21:48:13+00:00</updated>
<author>
<name>Konstantin Varlamov</name>
<email>varconsteq@gmail.com</email>
</author>
<published>2024-01-19T21:48:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=58780b811c23df3d928d8452ee21c862dde754a2'/>
<id>58780b811c23df3d928d8452ee21c862dde754a2</id>
<content type='text'>
In the hardening modes that can be used in production (`fast` and
`extensive`), make a failed assertion invoke a trap instruction rather
than calling verbose abort. In the debug mode, still keep calling
verbose abort to provide a better user experience and to allow us to
keep our existing testing infrastructure for verifying assertion
messages. Since the debug mode by definition enables all assertions, we
can be sure that we still check all the assertion messages in the
library when running the test suite in the debug mode.

The main motivation to use trapping in production is to achieve better
code generation and reduce the binary size penalty. This way, the
assertion handler can compile to a single instruction, whereas the
existing mechanism with verbose abort results in generating a function
call that in general cannot be optimized away (made worse by the fact
that it's a variadic function, imposing an additional penalty). See the
[RFC](https://discourse.llvm.org/t/rfc-hardening-in-libc/73925) for more
details. Note that this mechanism can now be completely [overridden at
CMake configuration
time](https://github.com/llvm/llvm-project/pull/77883).

This patch also significantly refactors `check_assertion.h` and expands
its test coverage. The main changes:
- when overriding `verbose_abort`, don't do matching inside the function
-- just print the error message to `stderr`. This removes the need to
set a global matcher and allows to do matching in the parent process
after the child finishes;
- remove unused logic for matching source locations and for using
wildcards;
- make matchers simple functors;
- introduce `DeathTestResult` that keeps data about the test run,
primarily to make it easier to test.

In addition to the refactoring, `check_assertion.h` can now recognize
when a process exits due to a trap.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In the hardening modes that can be used in production (`fast` and
`extensive`), make a failed assertion invoke a trap instruction rather
than calling verbose abort. In the debug mode, still keep calling
verbose abort to provide a better user experience and to allow us to
keep our existing testing infrastructure for verifying assertion
messages. Since the debug mode by definition enables all assertions, we
can be sure that we still check all the assertion messages in the
library when running the test suite in the debug mode.

The main motivation to use trapping in production is to achieve better
code generation and reduce the binary size penalty. This way, the
assertion handler can compile to a single instruction, whereas the
existing mechanism with verbose abort results in generating a function
call that in general cannot be optimized away (made worse by the fact
that it's a variadic function, imposing an additional penalty). See the
[RFC](https://discourse.llvm.org/t/rfc-hardening-in-libc/73925) for more
details. Note that this mechanism can now be completely [overridden at
CMake configuration
time](https://github.com/llvm/llvm-project/pull/77883).

This patch also significantly refactors `check_assertion.h` and expands
its test coverage. The main changes:
- when overriding `verbose_abort`, don't do matching inside the function
-- just print the error message to `stderr`. This removes the need to
set a global matcher and allows to do matching in the parent process
after the child finishes;
- remove unused logic for matching source locations and for using
wildcards;
- make matchers simple functors;
- introduce `DeathTestResult` that keeps data about the test run,
primarily to make it easier to test.

In addition to the refactoring, `check_assertion.h` can now recognize
when a process exits due to a trap.</pre>
</div>
</content>
</entry>
</feed>
