Commit 9a4e155
committed
alloc: restore trust to native malloc
Do not kneel in front of bad static analyzers
and try to align your allocs. This method of
extending/aligning over the native malloc uapi
will render some of the memory/malloc analyzer
detection useless, like not seeing out of bounds
accesses on non aligned ones.
Instead of catering to some bad analyzer, use native
malloc and thus give full visibility to proper ones.
If some architecture still needs aligment to long,
it should be special cased and not taint the sane ones.
Remove aligment padding from alloc(), return
void ptrs like in native malloc and deny zero sized
allocs.1 parent 0378860 commit 9a4e155
2 files changed
+23
-38
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
320 | 320 | | |
321 | 321 | | |
322 | 322 | | |
323 | | - | |
324 | | - | |
| 323 | + | |
| 324 | + | |
325 | 325 | | |
326 | 326 | | |
327 | 327 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
| 24 | + | |
| 25 | + | |
45 | 26 | | |
46 | 27 | | |
47 | | - | |
48 | | - | |
| 28 | + | |
| 29 | + | |
49 | 30 | | |
50 | | - | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
51 | 35 | | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
56 | 39 | | |
57 | | - | |
| 40 | + | |
58 | 41 | | |
59 | 42 | | |
60 | 43 | | |
61 | | - | |
62 | | - | |
| 44 | + | |
| 45 | + | |
63 | 46 | | |
64 | | - | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
65 | 51 | | |
66 | | - | |
67 | | - | |
| 52 | + | |
68 | 53 | | |
69 | | - | |
| 54 | + | |
70 | 55 | | |
71 | 56 | | |
72 | | - | |
| 57 | + | |
73 | 58 | | |
74 | 59 | | |
75 | 60 | | |
| |||
0 commit comments