summaryrefslogtreecommitdiff
path: root/HACKING
blob: 63454f8558e98fedaf7128efd083430944346830 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
HACKING p11-kit

 * Website: http://p11-glue.freedesktop.org/p11-kit.html

 * Mailing list: p11-glue@lists.freedesktop.org

 * Bugs: https://bugs.freedesktop.org/enter_bug.cgi?product=p11-glue

PRECONDITIONS and UNEXPECTED SYSTEM ISSUES

We don't try to guarantee completely robust and problem free behavior in cases
where the caller or process isn't behaving. We consider these to be outside of
our control:

 * Broken input from callers. We use preconditions to check input
   and immediately return.

 * Out of memory. It is pretty much impossible to handle out of memory
   errors correctly. Handling them alongside other errors is naive and
   broken.

   We do check the results from all memory allocations.

   As a nod to the behavior of callers of this library, we don't abort on
   memory allocation failures. We use preconditions with somewhat sane results.

   We don't try to guarantee library state (such as locks or memory leaks)
   when memory allocation fails.

   Exception: when reading files or allocating potentially unbounded amounts
   of memory, we should respond robustly to memory allocation failures.