Skip to content

Improve support for setvar_* attributes#26

Merged
Ivan-Velickovic merged 1 commit intoau-ts:mainfrom
nspin:pr/improve-setvar-support
Mar 30, 2026
Merged

Improve support for setvar_* attributes#26
Ivan-Velickovic merged 1 commit intoau-ts:mainfrom
nspin:pr/improve-setvar-support

Conversation

@nspin
Copy link
Copy Markdown
Contributor

@nspin nspin commented Oct 30, 2025

Adds function arguments and struct fields throughout for adding setvar_vaddr, setvar_size, and setvar_id SDF attributes.

Depends on seL4/microkit#338

@nspin nspin force-pushed the pr/improve-setvar-support branch from 5f82fef to 16f735a Compare October 30, 2025 05:27
@Ivan-Velickovic
Copy link
Copy Markdown
Collaborator

Okay I don't see any issues right now just in the destroy functions for the relevant element, call allocator.free on the bytes that you call allocator.dupe with to avoid leaking memory.

@nspin nspin force-pushed the pr/improve-setvar-support branch 4 times, most recently from 16f735a to 875074d Compare October 31, 2025 23:23
@nspin
Copy link
Copy Markdown
Contributor Author

nspin commented Oct 31, 2025

I added those allocator.free calls. In doing so, I encountered a bug where those export fn sdfgen_*_destroy functions were being called from Python too early, because their corresponding Python objects were being garbage collected too early. For example, mr was being garbage collected right after a call to sdf.add_mr(mr). So, I added a mechanism for sdf to keep a reference to mr to avoid premature garbage collection.

Signed-off-by: Nick Spinale <nick@nickspinale.com>
@nspin nspin force-pushed the pr/improve-setvar-support branch from 875074d to 6a42abb Compare March 23, 2026 05:22
@Ivan-Velickovic Ivan-Velickovic merged commit e92b69d into au-ts:main Mar 30, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants