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

uksignal support crashes app-helloworld-go build #10

Open
razvanvirtan opened this issue Sep 10, 2021 · 1 comment
Open

uksignal support crashes app-helloworld-go build #10

razvanvirtan opened this issue Sep 10, 2021 · 1 comment
Assignees
Labels
bug Something isn't working
Milestone

Comments

@razvanvirtan
Copy link
Contributor

razvanvirtan commented Sep 10, 2021

When trying to build app-helloworld-go, we get this error:

/home/razvan/Documents/Unikraft/debug_helloworld_go/apps/app-helloworld-go/build/libgcc/origin/gcc-7.3.0/libgo/runtime/go-signal.c:200:33: error: ‘siginfo_t {aka struct <anonymous>}’ has no member named ‘si_addr’; did you mean ‘si_code’?
   ret.sigaddr = (uintptr)(info->si_addr);

This didn't happen before the uksignal support was integrated in newlib [1].
Apparently, the definition for siginfo_t is now provided by lib-newlib/musl-imported/include/signal.h and it is lighter than before, not including si_addr (this patch has lost it's effect [2]).

I think some newlib/uksignal updates will be needed in order to cover this usecase again.

[1] 08d36e6
[2] https://github.com/unikraft/lib-newlib/blob/staging/patches/0006-Add-si_addr-field-for-siginfo_t-and-use-__rtems__-de.patch

@cffs
Copy link

cffs commented Sep 10, 2021

I am afraid the problem is not just in the type definition. This siginfo_t definition correctly reflects what is actually supported by uksignal, which is not yet POSIX compatible. The only siginfo_t fields ever set by uksignal are si_signo, si_code and si_pid. If si_addr is needed, we should likely ensure it is properly set by the appropriate functions.
Question: how should we synchronize siginfo_t definitions in C libraries such as newlib or musl, and the actual implementation in uksignal?

@razvand razvand linked a pull request Nov 6, 2021 that will close this issue
@razvand razvand added this to the v0.6 Dione milestone Nov 6, 2021
@razvand razvand added the bug Something isn't working label Nov 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
No open projects
Status: No status
Development

Successfully merging a pull request may close this issue.

3 participants