Repository navigation
Conversation
…igtimedwait FreeBSD 11.4 stamps the queued signal with the sender: kill() uses SI_USER 0x10001 (sys/kern/kern_sig.c:1788), thr_kill, and so raise and pthread_kill, use SI_LWP 0x10007 (kern_thr.c:401, lib/libc/gen/raise.c:52), and the SIGALRM expiry of an interval timer comes from kern_psignal with SI_KERNEL 0x10006 and pid 0 (kern_time.c:899, kern_sig.c:2087; values in sys/sys/signal.h:400-409). The guest reported si_code 0 for all of them. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
|
Merged
12 tasks done
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The guest queue of pending signals kept only a bit per signal, and
FillSiginfoalways wrotesi_code0 (and the caller's pid). FreeBSD 11.4 stamps the signal with the sender:killwithSI_USER(0x10001, sys/kern/kern_sig.c:1788),thr_kill(soraiseandpthread_kill) withSI_LWP(0x10007, kern_thr.c:401, lib/libc/gen/raise.c:52), and the interval-timer expiry withSI_KERNEL(0x10006) and pid 0 (kern_time.c:899, kern_sig.c:2087). Each pending signal now stores its code when it is marked, andsigwaitinfo/sigtimedwaitreturn it. The expectations inguest_sigtimedwaitthat pinned 0 change accordingly.Fixes #8496
The expectations of
guest_sigtimedwaitthat #4138 set to 0 change here; #4138 took thesiginfo_tlayout from FreeBSD 11 and did not measuresi_codeon a console, as far as its description says. Overlap: #7192 (open) touchesSignals.cppand thesiginfofill;git merge-treeis clean for it and for #8407, #8411, #8414 and #8467, and has conflicts with #3986 (3), #6044 (26) and #7201 (25).pr_overlapwas not run.Tested
Windows 10 (19045), MinGW-w64 GCC 15.2.0, Release, on upstream/main cabd80f + this commit:
guest_sigtimedwait:Exit code 0xc0000409withSystem/src/Signals.cpptaken back to main (new expectations kept), passes with the change (3 of 3 runs). Cases:raiseandpthread_killfrom another thread givesi_code0x10007;kill(getpid(), SIGINT)gives 0x10001 with the caller's pid; a blocked SIGALRM fromalarm(1)gives 0x10006 and pid 0.guest_signals,guest_itimer,guest_itimer_pending_default,guest_kill,guest_signal_sets,guest_sigaltstack,guest_getitimerpass.python tools/check_conventions.py --base upstream/main: passes.si_code. Signals that arrive asynchronously from the host keepSI_LWP.Checklist
main; no other open PR implements the same functions.mdfiles or images added to the repositoryAI-assisted (Claude Code).
🤖 Generated with Claude Code