aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMiquel Sabaté Solà <mssola@mssola.com>2026-04-08 16:04:12 +0200
committerMiquel Sabaté Solà <mssola@mssola.com>2026-04-08 16:04:12 +0200
commita2cb050ca18fd7c5533d69e9aa093e4f0a40d0fa (patch)
tree9ee9c3c72804c7e78c4dc3e7382f29c669f6da35 /tests
parentabaffa61df7db8522d29869f7c455c59b8e96dbc (diff)
downloadtools.nes-a2cb050ca18fd7c5533d69e9aa093e4f0a40d0fa.tar.gz
tools.nes-a2cb050ca18fd7c5533d69e9aa093e4f0a40d0fa.zip
Implement the asan:stack statement
This statement allows programmers to reserve a memory range for the stack. This is useful to reserve a memory region which is not attached to any variable, and: 1. It is a way to safely reserve space on the $0100 page. 2. The --stats/--write-info flags will be able to add up the memory space reserved for the stack. 3. Future tooling might be able to use this value as a way to detect stack overflows. Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/asan_reserve_constant.s2
-rw-r--r--tests/avoid_bad_macro.s2
-rw-r--r--tests/bad_fallthrough.s2
-rw-r--r--tests/bad_jal.s2
-rw-r--r--tests/bare_accesses.s2
-rw-r--r--tests/delayed_macro_arguments.s2
-rw-r--r--tests/fallthrough.s2
-rw-r--r--tests/indirect.s2
-rw-r--r--tests/unused.s2
-rw-r--r--tests/variable_names.s2
10 files changed, 20 insertions, 0 deletions
diff --git a/tests/asan_reserve_constant.s b/tests/asan_reserve_constant.s
index 8af9cad..49f461b 100644
--- a/tests/asan_reserve_constant.s
+++ b/tests/asan_reserve_constant.s
@@ -18,3 +18,5 @@ lda zp_var
lda zp_another
lda zp_yet_another
lda zp_and_yet
+
+;;; asan:stack full
diff --git a/tests/avoid_bad_macro.s b/tests/avoid_bad_macro.s
index f701c2b..cd310a8 100644
--- a/tests/avoid_bad_macro.s
+++ b/tests/avoid_bad_macro.s
@@ -14,3 +14,5 @@
.endif
lda #1
+
+;;; asan:stack full
diff --git a/tests/bad_fallthrough.s b/tests/bad_fallthrough.s
index 80c35c3..43dfa18 100644
--- a/tests/bad_fallthrough.s
+++ b/tests/bad_fallthrough.s
@@ -25,3 +25,5 @@ __fallthrough__ other
.endproc
__fallthrough__ other
+
+;;; asan:stack full
diff --git a/tests/bad_jal.s b/tests/bad_jal.s
index 693fa7d..5fa2316 100644
--- a/tests/bad_jal.s
+++ b/tests/bad_jal.s
@@ -16,3 +16,5 @@
.proc bar
rts
.endproc
+
+;;; asan:stack full
diff --git a/tests/bare_accesses.s b/tests/bare_accesses.s
index cebdc10..8b05fb0 100644
--- a/tests/bare_accesses.s
+++ b/tests/bare_accesses.s
@@ -42,3 +42,5 @@ lda $200
jmp $8000
jmp ($8000)
+
+;;; asan:stack full
diff --git a/tests/delayed_macro_arguments.s b/tests/delayed_macro_arguments.s
index b91ec92..acd3910 100644
--- a/tests/delayed_macro_arguments.s
+++ b/tests/delayed_macro_arguments.s
@@ -47,3 +47,5 @@
rts
.endproc
.endscope
+
+;;; asan:stack full
diff --git a/tests/fallthrough.s b/tests/fallthrough.s
index 6e95b5e..2243415 100644
--- a/tests/fallthrough.s
+++ b/tests/fallthrough.s
@@ -21,3 +21,5 @@ __fallthrough__ bar
.proc other
rts
.endproc
+
+;;; asan:stack full
diff --git a/tests/indirect.s b/tests/indirect.s
index 9629d5f..2237b7e 100644
--- a/tests/indirect.s
+++ b/tests/indirect.s
@@ -16,3 +16,5 @@ jmp (zp_something)
lala:
rts
+
+;;; asan:stack full
diff --git a/tests/unused.s b/tests/unused.s
index c26ac42..938794d 100644
--- a/tests/unused.s
+++ b/tests/unused.s
@@ -16,3 +16,5 @@ zp_yet = $04
lda zp_used
lda (zp_more), y
lda #.lobyte(zp_yet)
+
+;;; asan:stack full
diff --git a/tests/variable_names.s b/tests/variable_names.s
index beda2b8..a1dc578 100644
--- a/tests/variable_names.s
+++ b/tests/variable_names.s
@@ -36,3 +36,5 @@ lda wr_out
.endmacro
INC_MOVEMENT_X zp_good + 1
+
+;;; asan:stack full