-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Add in the sigtrap si_codes #4225
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes here lgtm, but you may as well also add SI_DETHREAD
, SI_ASYNCNL
, and TRAP_PERF
so so the lists are complete. If this causes CI to fail on platforms with older headers, you should just be able to just skip them on
https://github.com/rust-lang/libc/blob/55d8d8359ecdfacc1ce1d5a74c29ffd5586b454e/libc-test/build.rs.
Also - linux_like/mod.rs
makes these available on both Android and emscripten (cc @maurer and @hoodmane). Android seems to have these https://cs.android.com/android/platform/superproject/main/+/main:bionic/libc/kernel/uapi/asm-generic/siginfo.h;l=118-127;drc=0f795217061c52c557fce451bf1c26ac578d1cbd but I don't think emscripten does, so these should probably be moved to linux_like/linux.rs
and copied to linux_like/linux/mod.rs
and copied to linux_like/android/mod.rs
. (I want to organize this crate at some point so less of this is needed).
These are all present in Emscripten. For instance: #include <signal.h>
_Static_assert(SI_ASYNCIO == -4); compiles fine. So I think it is fine to include them in Emscripten. Whether they are useful for anything is a separate question. |
I stand corrected, thanks for checking so quickly! In that case @xd009642 if you could add the remaining few constants then this should be good to merge. |
Sure it'll have to wait till Monday at the earliest as I'm on holiday but will do 🫡 |
Some changes occurred in the Android module cc @maurer |
@tgross35 okay I'm hoping it's all good, looks like that last android test should pass as well. Hopefully I figured out the build script filtering correctly and wasn't too blunt-force makes CI pass. Hmm looks like android timed out. Is this a flaky test thing? Some upgrade needed or something my end? |
Description
Adds the sigtrap si code constants for interpretting the results when getting siginfo after a sigtrap.
Sources
I didn't include the perf trap as it's not on my system.
https://github.com/torvalds/linux/blob/master/include/uapi/asm-generic/siginfo.h#L255-L264
Checklist
libc-test/semver
have been updated*LAST
or*MAX
areincluded (see #3131)
cd libc-test && cargo test --target mytarget
);especially relevant for platforms that may not be checked in CI