summaryrefslogtreecommitdiff
path: root/docs/esp32/tutorial/index.rst
diff options
context:
space:
mode:
authorAngus Gratton <angus@redyak.com.au>2024-02-13 09:24:36 +1100
committerDamien George <damien@micropython.org>2024-04-22 11:50:52 +1000
commit4bed614e707c0644c06e117f848fa12605c711cd (patch)
tree5deed37ec215eeff1d7eb540c6b8f9ae51d1725f /docs/esp32/tutorial/index.rst
parentce491ab0d168a8278062e1fc7ebed3ca47ab89d2 (diff)
py/objarray: Fix use-after-free if extending a bytearray from itself.
Two cases, one assigning to a slice. Closes https://github.com/micropython/micropython/issues/13283 Second is extending a slice from itself, similar logic. In both cases the problem occurs when m_renew causes realloc to move the buffer, leaving a dangling pointer behind. There are more complex and hard to fix cases when either argument is a memoryview into the buffer, currently resizing to a new address breaks memoryviews into that object. Reproducing this bug and confirming the fix was done by running the unix port under valgrind with GC-aware extensions. Note in default configurations with GIL this bug exists but has no impact (the free buffer won't be reused while the function is still executing, and is no longer referenced after it returns). Signed-off-by: Angus Gratton <angus@redyak.com.au>
Diffstat (limited to 'docs/esp32/tutorial/index.rst')
0 files changed, 0 insertions, 0 deletions