Commit ce79b10
committed
Build the self monitor reference with term_from_ref_ticks
Monitoring self installs no alias, so the returned reference is always a
short ref. The path reserved TERM_BOXED_SHORT_REF_SIZE but built the term
with term_from_ref_data, whose allocation size depends on the embedded
pid. At runtime this is safe (process_id is INVALID_PROCESS_ID, so
term_from_ref_data returns a short ref of exactly that size), but the
static allocation check cannot prove the pid stays invalid and sizes it
as a process ref, reporting a 3-vs-2 term over-allocation.
Call term_from_ref_ticks directly: it allocates exactly
TERM_BOXED_SHORT_REF_SIZE, matching the reservation, and is identical to
what term_from_ref_data does for an invalid pid.
Signed-off-by: Davide Bettio <davide@uninstall.it>1 parent 288bd8a commit ce79b10
1 file changed
Lines changed: 5 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5069 | 5069 | | |
5070 | 5070 | | |
5071 | 5071 | | |
5072 | | - | |
5073 | 5072 | | |
5074 | 5073 | | |
5075 | 5074 | | |
5076 | | - | |
| 5075 | + | |
| 5076 | + | |
| 5077 | + | |
| 5078 | + | |
| 5079 | + | |
5077 | 5080 | | |
5078 | 5081 | | |
5079 | 5082 | | |
| |||
0 commit comments