Skip to content

Conversation

@cfallin
Copy link

@cfallin cfallin commented Jun 15, 2021

The ucontext_t struct on OpenBSD (which is actually a typedef to
struct sigcontext) represents the on-stack saved state that is
available for a signal handler on OpenBSD to read and/or modify. Its
definition comes from <machine/signal.h>, and was copied from OpenBSD
6.9, which is the current version. Note that OpenBSD does not guarantee
ABI compatibility across versions, so this would have to be updated if
the frame format ever does change; however, it is very useful to have
(it is not possible to know the faulting PC in a signal handler
otherwise), so I suspect including this definition is worthwhile.

The `ucontext_t` struct on OpenBSD (which is actually a typedef to
`struct sigcontext`) represents the on-stack saved state that is
available for a signal handler on OpenBSD to read and/or modify. Its
definition comes from <machine/signal.h>, and was copied from OpenBSD
6.9, which is the current version. Note that OpenBSD does not guarantee
ABI compatibility across versions, so this would have to be updated if
the frame format ever does change; however, it is very useful to have
(it is not possible to know the faulting PC in a signal handler
otherwise), so I suspect including this definition is worthwhile.
@rust-highfive
Copy link

Some changes occurred in OpenBSD module

cc @semarie

@rust-highfive
Copy link

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @JohnTitor (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@semarie
Copy link
Contributor

semarie commented Jun 15, 2021

there is already on-going work in #2189 to add sigcontext_t definition. thanks.

@cfallin
Copy link
Author

cfallin commented Jun 15, 2021

Ah, that's fantastic, thanks! I hadn't seen that PR, sorry. Will close this PR now.

@cfallin cfallin closed this Jun 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants