Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libsel4utils: remove unused environment setup #80

Merged
merged 1 commit into from
Sep 9, 2024

Conversation

anchao
Copy link
Contributor

@anchao anchao commented Sep 11, 2023

libsel4utils: remove unused environment setup

It is unnecessary to writing environment to the stack since the target environment size is always 0.

This PR also fix compile warning on native X86 build:

[2/8] Building C object apps/sel4test-driver/seL4_libs/libsel4utils/CMakeFiles/sel4utils.dir/src/process.c.obj
/home/archer/code/sel4/projects/seL4_libs/libsel4utils/src/process.c: In function ‘sel4utils_spawn_process_v’:
/home/archer/code/sel4/projects/seL4_libs/libsel4utils/src/process.c:320:13: warning: ‘sel4utils_stack_copy_args’ accessing 8 bytes in a region of size 0 [-Wstringop-overflow=]
  320 |     error = sel4utils_stack_copy_args(vspace, &process->vspace, vka, envc, envp, dest_envp, &initial_stack_pointer);
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/archer/code/sel4/projects/seL4_libs/libsel4utils/src/process.c:320:13: note: referencing argument 5 of type ‘char *[0]’
/home/archer/code/sel4/projects/seL4_libs/libsel4utils/src/process.c:209:12: note: in a call to function ‘sel4utils_stack_copy_args’
  209 | static int sel4utils_stack_copy_args(vspace_t *current_vspace, vspace_t *target_vspace,
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~
[8/8] Generating ../../images/sel4test-driver-image-x86_64-pc99

It is unnecessary to writing environment to the stack since the
target environment size is always 0.

Signed-off-by: chao an <[email protected]>
@FennelFoxxo
Copy link

+1
Getting the same compiler warning here too, this fixes it

@kent-mcleod kent-mcleod merged commit 88c7615 into seL4:master Sep 9, 2024
15 checks passed
@kent-mcleod
Copy link
Member

Thanks, I agree that as no environment variables are ever able to be set, the lines being removed are not needed. The null-termination value for the empty environment section is still intentionally left in to be compatible with the init ABI.

@lsf37
Copy link
Member

lsf37 commented Sep 9, 2024

This merge might have broken something in the camkes examples, at least this PR is the only difference between the previous working run and the currently failing one in https://github.com/seL4/camkes-tool/actions/runs/10770953732/job/29866025686 for imx8mm.

Although I think we might have changed something on the machine queue side for imx8mm since then. @alwin-joshy / @Ivan-Velickovic could you have a brief look at that?

@alwin-joshy
Copy link

alwin-joshy commented Sep 9, 2024 via email

@kent-mcleod
Copy link
Member

It seems like an unrelated failure.

@alwin-joshy
Copy link

Yep, it's not to do with this commit, it's an issue with the machine queue. The cause is seL4/seL4_tools#205, and it seems like the load address of the imx8 in machine queue was changed back to the old one.

@alwin-joshy
Copy link

@lsf37 The address that uboot loads the image to has been changed back to 0x42000000, so the CI should run now.

@lsf37
Copy link
Member

lsf37 commented Sep 23, 2024

Thanks, can confirm that CI is working again.

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.

5 participants