Add tests for purging symbols

This commit is contained in:
ISSOtm
2020-03-24 10:52:45 +01:00
parent 7deb8d3e8a
commit 666b9f8f7b
6 changed files with 32 additions and 0 deletions

13
test/asm/purge-refs.asm Normal file
View File

@@ -0,0 +1,13 @@
SECTION "floating purging", ROM0
Floating:
db Floating
PURGE Floating ; This used to cause a use-after-free
; To increase the chances of the data being re-allocated, it's not last
SECTION "fixed purging", ROM0[0]
Fixed:
db Fixed
PURGE Fixed ; Can work, it's a constant