CKTIS / C
abort — abnormal program termination
The abort() function from <stdlib.h> initiates abnormal program termination and never returns to its caller.
Version: C23; repository compiler flag, production runtime not attested
Syntax
#include <stdlib.h>
[[noreturn]] void abort(void);
abort();abort() takes no arguments. In its C23 declaration, [[noreturn]] means it never returns to its caller, rather than returning an error code.
It calls raise(SIGABRT). Termination may be avoided if a SIGABRT handler takes control and does not return. Returning from that handler does not allow execution to continue after abort().
Unlike exit(), this is not normal termination invoking functions registered through atexit(). Buffer flushing, stream closing, and temporary-file removal are implementation-defined. Do not rely on that cleanup; the exact form of the unsuccessful termination status is also implementation-defined.
Examples
#include <stdlib.h>
int main(void)
{
abort();
}
The displayed code and declared result were verified in an isolated environment using the method recorded in the verification evidence for this exact version.