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

[libc] Update siginfo_t to match kernel definition #66560

Merged
merged 3 commits into from
Sep 21, 2023

Commits on Sep 16, 2023

  1. [libc] Update siginfo_t to match kernel definition

    This patch updates the siginfo_t struct definition to match the
    definition from the kernel in here:
    
    https://github.com/torvalds/linux/blob/master/include/uapi/asm-generic/siginfo.h
    
    In particular, there are two main changes:
    
    1. swap position of si_code and si_errno: si_code show come after
       si_errno in all systems except MIPS. Since we don't MIPS, the order
       is fixed for now, but can be easily \#ifdef'd if MIPS support is
       implemented in the future.
    
    2. We add a union of structs that are filled depending on the signal
       raised.
    
    This change was required for the fork and spawn integration tests in rv32,
    since they fork/clone the running process, call wait/waitid/waitpid, and
    read the status, which was wrong in rv32 because wait/waitid/waitpid are
    implemented in rv32 using SYS_waitid.
    
    SYS_waitid takes a pointer to a siginfo_t and fills the proper fields in
    the struct. The previous siginfo_t definition was being incorrectly
    filled due to not taking into account the signal raised.
    mikhailramalho committed Sep 16, 2023
    Configuration menu
    Copy the full SHA
    579f026 View commit details
    Browse the repository at this point in the history
  2. Added padding

    mikhailramalho committed Sep 16, 2023
    Configuration menu
    Copy the full SHA
    62d317e View commit details
    Browse the repository at this point in the history

Commits on Sep 21, 2023

  1. Configuration menu
    Copy the full SHA
    4161ad6 View commit details
    Browse the repository at this point in the history