* Returns 1 (true) if altstack is configured for the thread, and the * passed stack bottom address falls into the altstack range. Handles * the 43 compat special case where the alt stack size is zero. */
| 631 | * the 43 compat special case where the alt stack size is zero. |
| 632 | */ |
| 633 | int |
| 634 | sigonstack(size_t sp) |
| 635 | { |
| 636 | struct thread *td; |
| 637 | |
| 638 | td = curthread; |
| 639 | if ((td->td_pflags & TDP_ALTSTACK) == 0) |
| 640 | return (0); |
| 641 | #if defined(COMPAT_43) |
| 642 | if (SV_PROC_FLAG(td->td_proc, SV_AOUT) && td->td_sigstk.ss_size == 0) |
| 643 | return ((td->td_sigstk.ss_flags & SS_ONSTACK) != 0); |
| 644 | #endif |
| 645 | return (sp >= (size_t)td->td_sigstk.ss_sp && |
| 646 | sp < td->td_sigstk.ss_size + (size_t)td->td_sigstk.ss_sp); |
| 647 | } |
| 648 | |
| 649 | static __inline int |
| 650 | sigprop(int sig) |
no outgoing calls
no test coverage detected