Commit 1930510
committed
Merge pull request atomvm#509 from pguyot/w16/fix-refc-binary-info
Fix potential GC crash related to `OP_RECV_MARKER_RESERVE`
This bug could potentially yield a crash with current GC/memory implementation, however it was not
observed.
The crash can be observed with heap fragments, though.
The compiler puts allocate to allocate three y registers, registers 1 and 2 are filled with move
opcode, register 0 is supposed to be filled by the recv_marker_reserve, and then GC is called and can
find garbage (here 2B) and then crash.
<img width="735" alt="image"
src="https://user-images.githubusercontent.com/168407/233457776-0402d466-4231-4418-b9af-22f39efc742b.png">
These changes are made under both the "Apache 2.0" and the "GNU Lesser General
Public License 2.1 or later" license terms (dual license).
SPDX-License-Identifier: Apache-2.0 OR LGPL-2.1-or-later1 file changed
+4
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6195 | 6195 | | |
6196 | 6196 | | |
6197 | 6197 | | |
| 6198 | + | |
| 6199 | + | |
| 6200 | + | |
| 6201 | + | |
6198 | 6202 | | |
6199 | 6203 | | |
6200 | 6204 | | |
| |||
0 commit comments