llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
29.27k stars 12.09k forks source link

[libc] annex K "Runtime-constraint violations" support #115907

Open nickdesaulniers opened 1 week ago

nickdesaulniers commented 1 week ago

K.3.1.4 Runtime-constraint violations

Talks about having a callback function invocation when various constraints are violated.

K.3.6 General utilities

Talks about the signature of a constraint_handler_t as provided by stdlib.h.

K.3.6.1.1 The set_constraint_handler_s function

Talks about a setter for the callback.

K.3.6.1.2 The abort_handler_s function K.3.6.1.3 The ignore_handler_s function

Talk about two predefined callbacks that can be set to handle the two most common cases.

We're adding ctime_s support in #110676, but without these callback invocations. ctime_s (and any annex k functions) need to be revisited when set_constraint_handler_s support is added.

llvmbot commented 1 week ago

@llvm/issue-subscribers-libc

Author: Nick Desaulniers (nickdesaulniers)

> K.3.1.4 Runtime-constraint violations Talks about having a callback function invocation when various constraints are violated. > K.3.6 General utilities <stdlib.h> Talks about the signature of a `constraint_handler_t` as provided by stdlib.h. > K.3.6.1.1 The set_constraint_handler_s function Talks about a setter for the callback. > K.3.6.1.2 The abort_handler_s function > K.3.6.1.3 The ignore_handler_s function Talk about two predefined callbacks that can be set to handle the two most common cases. We're adding `ctime_s` support in #110676, but without these callback invocations. `ctime_s` (and any annex k functions) need to be revisited when `set_constraint_handler_s` support is added.