Commit c90f8c9
committed
Add CodeQL query to check allocations do not exceed ensure_free
The query also checks redundant ensure_free calls, i.e. calls
followed by another call with no allocation in between.
Fix errors found by the query:
- Fix an insufficient ensure_free in `enif_make_resource_binary`
- Added a missing ensure_free in esp32 `dac_driver.c`
- Remove nine redundant ensure_free calls followed by `enif_make_resource`
in `otp_ssl.c` and `otp_socket.c` and esp32 drivers
- Remove a redundant ensure_free call in `nif_erlang_fun_to_list`
Signed-off-by: Paul Guyot <pguyot@kallisys.net>1 parent 7246c60 commit c90f8c9
File tree
12 files changed
+533
-52
lines changed- .github/workflows
- code-queries
- src
- libAtomVM
- platforms/esp32/components/avm_builtins
12 files changed
+533
-52
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
68 | | - | |
| 68 | + | |
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
77 | | - | |
| 77 | + | |
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
95 | | - | |
| 95 | + | |
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
81 | | - | |
| 81 | + | |
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | | - | |
| 65 | + | |
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| |||
0 commit comments