Commit 0a29546
Remove the last vestiges of autodetecting heap/stack size from exes (#1097)
When we supported loading guest binaries from PE files, we also
supported autodetecting reasonable defaults for heap and stack size
for the sandbox based on the loaded executable's stack/heap size
hints. ELF files did not have a similar convention for stack/heap
size hints embedded in the file, so when loading an ELF file, we just
used some vaguely reasonable small defaults (64k stack and 128k heap).
Now that PE support is gone, these are in fact the defaults used for
/all/ files, so it doesn't make much sense that we bother putting them
into an executable information structure and passing it around. This
commit removes that vestigial use of the ExeInfo structure, replacing
it with defaults inline in `sandbox::config`.
Signed-off-by: Simon Davies <simongdavies@users.noreply.github.com>
Co-authored-by: Lucy Menon <168595099+syntactically@users.noreply.github.com>1 parent b82cf78 commit 0a29546
3 files changed
+12
-29
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | 35 | | |
43 | 36 | | |
44 | 37 | | |
| |||
84 | 77 | | |
85 | 78 | | |
86 | 79 | | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | 80 | | |
98 | 81 | | |
99 | 82 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
327 | 327 | | |
328 | 328 | | |
329 | 329 | | |
330 | | - | |
331 | | - | |
| 330 | + | |
| 331 | + | |
332 | 332 | | |
333 | 333 | | |
334 | 334 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
25 | | - | |
26 | 24 | | |
27 | 25 | | |
28 | 26 | | |
| |||
105 | 103 | | |
106 | 104 | | |
107 | 105 | | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
108 | 110 | | |
109 | 111 | | |
110 | 112 | | |
| |||
267 | 269 | | |
268 | 270 | | |
269 | 271 | | |
270 | | - | |
| 272 | + | |
271 | 273 | | |
272 | | - | |
| 274 | + | |
273 | 275 | | |
274 | 276 | | |
275 | 277 | | |
276 | 278 | | |
277 | 279 | | |
278 | | - | |
| 280 | + | |
279 | 281 | | |
280 | | - | |
| 282 | + | |
281 | 283 | | |
282 | 284 | | |
283 | 285 | | |
| |||
303 | 305 | | |
304 | 306 | | |
305 | 307 | | |
306 | | - | |
307 | 308 | | |
308 | 309 | | |
309 | 310 | | |
| |||
325 | 326 | | |
326 | 327 | | |
327 | 328 | | |
328 | | - | |
329 | 329 | | |
330 | | - | |
331 | | - | |
| 330 | + | |
| 331 | + | |
332 | 332 | | |
333 | 333 | | |
334 | 334 | | |
| |||
0 commit comments