From 4b13cb33c40720888fe967367bf009ca6cf272fd Mon Sep 17 00:00:00 2001 From: bdrewery Date: Mon, 23 Oct 2017 18:25:21 +0000 Subject: MFC r316286: Add support for capturing 'struct ptrace_lwpinfo' for signals resulting in a process dumping core in the corefile. Direct stable changed: Padding added to struct thread and td_si added to end with explicit bzeroing when forking/initializing a thread to preserve KBI. --- sys/kern/kern_thr.c | 1 + 1 file changed, 1 insertion(+) (limited to 'sys/kern/kern_thr.c') diff --git a/sys/kern/kern_thr.c b/sys/kern/kern_thr.c index 6bebac9..e434487 100644 --- a/sys/kern/kern_thr.c +++ b/sys/kern/kern_thr.c @@ -233,6 +233,7 @@ thread_create(struct thread *td, struct rtprio *rtp, bzero(&newtd->td_startzero, __rangeof(struct thread, td_startzero, td_endzero)); newtd->td_sleeptimo = 0; + bzero(&newtd->td_si, sizeof(newtd->td_si)); bcopy(&td->td_startcopy, &newtd->td_startcopy, __rangeof(struct thread, td_startcopy, td_endcopy)); newtd->td_sa = td->td_sa; -- cgit v1.1