aboutsummaryrefslogtreecommitdiff
path: root/lib/xixanta/src/node.rs
diff options
context:
space:
mode:
authorMiquel Sabaté Solà <mssola@mssola.com>2026-07-09 22:07:47 +0200
committerMiquel Sabaté Solà <mssola@mssola.com>2026-07-09 22:14:22 +0200
commit6f58e4ab8d90166cac4e4da269a77c5134f12f1e (patch)
tree207e1f418787df63c015178b1379b0e466b54e5c /lib/xixanta/src/node.rs
parent0664f0bad653ca750d320e513f685ab0c852f359 (diff)
downloadtools.nes-6f58e4ab8d90166cac4e4da269a77c5134f12f1e.tar.gz
tools.nes-6f58e4ab8d90166cac4e4da269a77c5134f12f1e.zip
Add support for the asan:fixed-segments comment
This magic comment allows for the definition of segments that are fixed and for which references are always safe. This goes in tandem with the asan:safe comment, which can then be used more sporadically. Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
Diffstat (limited to 'lib/xixanta/src/node.rs')
-rw-r--r--lib/xixanta/src/node.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/xixanta/src/node.rs b/lib/xixanta/src/node.rs
index 4f25158..649f333 100644
--- a/lib/xixanta/src/node.rs
+++ b/lib/xixanta/src/node.rs
@@ -276,6 +276,7 @@ pub enum CommentType {
AsanStack(Range<usize>),
AsanIgnore,
AsanSafe,
+ AsanFixedSegments(Vec<String>),
}
/// The PNode type.
@@ -380,6 +381,7 @@ impl fmt::Display for NodeType {
CommentType::AsanStack(_) => write!(f, ";; asan:stack"),
CommentType::AsanIgnore => write!(f, ";; asan:ignore"),
CommentType::AsanSafe => write!(f, ";; asan:safe"),
+ CommentType::AsanFixedSegments(_) => write!(f, ";; asan:fixed-segments"),
},
}
}