Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions reference/src/glossary.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,11 @@ Moreover, such unsafe code must not return a non-UTF-8 string to the "outside" o
To summarize: *Data must always be valid, but it only must be safe in safe code.*
For some more information, see [this blog post](https://www.ralfj.de/blog/2018/08/22/two-kinds-of-invariants.html).

#### Soundness (of code / of a library)

We say that a library (can be an individual function) is *sound* if it is impossible for safe code to cause Undefined Behavior using its public API.
Conversely, the library is *unsound* if safe code *can* cause Undefined Behavior.

#### Layout

The *layout* of a type defines its size and alignment as well as the offsets of its subobjects (e.g. fields of structs/unions/enum/... or elements of arrays).
Expand Down