Requirements#
Safecpp Requirements
|
status: draft
security: NO
safety: ASIL_B
|
||||
Functional Requirements#
C++ Exception Abort
|
status: valid
security: YES
safety: ASIL_B
|
||||
The safecpp library shall provide a mechanism to abort the program upon C++ exception allocation, allowing users to prevent any exception object from being created and hence to guarantee that no single exception will be possible to be thrown within an executable. Note This satisfies Avoidance of Exceptions (aou_req__platform__no_exceptions) |
|||||
Safe Arithmetic Operations
|
status: valid
security: YES
safety: ASIL_B
|
||||
The safecpp library shall provide arithmetic operations (addition, subtraction, multiplication, division, negation, absolute value, type casting, and comparison operations) that detect overflow, underflow, divide-by-zero, and precision loss for both integer and floating-point types, ensuring errors are handled safely and undefined behavior is prevented. |
|||||
Scoped Guards
|
status: valid
security: YES
safety: ASIL_B
|
||||
The safecpp library shall provide scope-bound callable wrappers that prevent resource leaks. |
|||||
Null-Terminated String
|
status: valid
security: NO
safety: ASIL_B
|
||||
The safecpp library shall provide a view type which guarantees that an underlying character sequence is guaranteed to be null-terminated. Such views type’s underlying character sequence shall not be possible to get modified via such view type’s methods. |
|||||
Safe Atomic operations
|
status: valid
security: YES
safety: ASIL_B
|
||||
The safecpp library shall provide a lock-free atomic addition operation for integral types with overflow detection. |
|||||
Non-Functional Requirements#
Code Coverage Termination
|
status: valid
security: NO
safety: ASIL_B
|
||||
The safecpp library shall provide a mechanism which automatically registers a termination handler which ensures that code coverage data is also persisted upon any process exit (e.g. during gtest’s Death Tests). |
|||||