Skip to content

Tool bug fixes#560

Merged
midnightveil merged 2 commits into
seL4:mainfrom
au-ts:assert_fail_fix
Jul 16, 2026
Merged

Tool bug fixes#560
midnightveil merged 2 commits into
seL4:mainfrom
au-ts:assert_fail_fix

Conversation

@dreamliner787-9

Copy link
Copy Markdown
Collaborator

See commit messages for motivation.

In main.rs, we build the system in multiple iterations to make
setvar region_paddr works. However there was a bug in allocation.rs
that did not return an error when the tool picked a bad physical
address. The code will continue simulating the capDL allocation
algorithm with bad physical addresses and cause the assert:

assert_eq!(u64::from(named_obj.object.paddr().unwrap()), cur_paddr);

to fail. Since the invariant that all physical addresses are valid at
this point have been violated. This commit fixed the error check to
always return an error.

Signed-off-by: Bill Nguyen <bill.nguyen@unsw.edu.au>
In the system build process, the capDL initialiser object is mutated to
pack the spec and estimate the available memory to user space.
This process is iterative to work out the exact amout of available
memory. But the code recycles the mutated object, which causes the PDs'
program images to not be loaded correctly.

We need to keep a fresh copy of the initialiser and use that fresh copy
every iteration.

Signed-off-by: Bill Nguyen <bill.nguyen@unsw.edu.au>
@dreamliner787-9 dreamliner787-9 self-assigned this Jul 16, 2026
@midnightveil
midnightveil merged commit d7d24b2 into seL4:main Jul 16, 2026
12 checks passed
@midnightveil
midnightveil deleted the assert_fail_fix branch July 16, 2026 00:52
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