Created attachment 191673 [details]
A pending change I have for src will remove the nested include of <machine/trap.h> from <machine/signal.h>. As a result, the ccl port needs to include <machine/trap.h> explicitly for access to T_PAGEFLT.
While here, I noticed that the port was also checking the wrong field for a flag indicating if the AVX state in an mcontext_t is valid. The flags are saved in 'mc_flags', not 'mc_trapno'. The code might have been wrong due to a misleading comment I just fixed yesterday in head (the command claimed the flag bits applied to mc_trapno rather than mc_flags).
A commit references this bug:
Date: Tue Mar 27 19:46:03 UTC 2018
New revision: 465746
- Explicitly include <machine/trap.h> for accessing T_PAGEFLT.
- Use 'mc_flags' in mcontext_t to check for valid AVX state, rather than
Submitted by: jhb
(In reply to John Baldwin from comment #1)