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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
use crateVarnodeId;
/// Per-parameter pointer attributes, LLVM-style, inferred (or read from a C
/// prototype) and consumed at call sites to relax the default "every pointer
/// argument aliases everything and is written through by the callee" assumption.
///
/// The two bits are deliberately independent: `readonly` proves only that the
/// callee does not write through the pointer *during this call*, which is enough
/// to stop a call from clobbering the cells the argument reaches (see
/// `mem_forward`'s call-kill). It does *not* prove the pointer is safe to reason
/// about across the call: a captured pointer can be written through later, so
/// frame-freshness reasoning additionally requires `nocapture`. Both bits default
/// to `false` (fully conservative); an inference/extern pass sets them.
/// Where one external call argument is loaded from at the call site.
///
/// Planned once by `external_sigs` from the C prototype + calling convention;
/// consumed by `argpromote_external`, which turns each slot into an SSA value at
/// every direct caller (a register reload or an SP-relative stack load).
/// One planned positional argument of an external call.
/// The memory kind of one prototyped-external parameter, as seen by the RAM
/// argmem model. An external can only touch memory *we* model through pointers
/// *we* pass it (its own libc-internal state lives outside the lifted image), so
/// each pointer parameter bounds a whole-object effect on the caller's argument.
///
/// The variants are ordered so the analysis layer needs no C-type data of its
/// own: it reads this per-input kind (kept in lockstep with the materialized
/// register-interface inputs) plus the function-level variadic flag.
/// C-prototype-derived argmem summary for a prototyped external: the ordered
/// per-parameter [`ArgMemKind`]s (in lockstep with the materialized register
/// interface inputs, so `params[i]` describes the `i`-th positional argument /
/// `Param(i)`) and whether the callee is variadic. Read by the RAM effect
/// channel's `external_leaf` to derive a bounded argmem footprint in place of ⊤.
/// `None` on the signature for non-externals and un-prototyped externals.
/// Serde-defaulted, so older `.harbinger` snapshots load with it absent.
/// C-prototype-derived call interface for an external (imported, bodyless)
/// function, planned once by `external_sigs` and consumed by
/// `argpromote_external`, which needs neither the binary nor `cabi` afterwards.
/// Optional ABI description attached to a function.
/// All fields are `Option` — only provided fields affect analysis.