Date: Mon, 15 Aug 2016 00:28:40 +0100 From: Steven Hartland <steven.hartland@multiplay.co.uk> To: Baptiste Daroussin <bapt@FreeBSD.org>, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: Re: svn commit: r304104 - stable/11/usr.bin/truss Message-ID: <e29a2e1d-02cc-588c-318d-9bf1c07c9ab6@multiplay.co.uk> In-Reply-To: <201608142243.u7EMhnA4029277@repo.freebsd.org> References: <201608142243.u7EMhnA4029277@repo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
This going to make it into 11.0-RELEASE? On 14/08/2016 23:43, Baptiste Daroussin wrote: > Author: bapt > Date: Sun Aug 14 22:43:48 2016 > New Revision: 304104 > URL: https://svnweb.freebsd.org/changeset/base/304104 > > Log: > MFC: r303685 > > truss: fix uninitialized trussinfo->curthread in add_threads()/enter_syscall > > trussinfo->curthread must be initialized before calling enter_syscall(), > it is used by t->proc->abi->fetch_args(). > Without that truss is segfaulting and the attached program also crash. > > Submitted by: Nikita Kozlov (nikita@gandi.net) > Reviewed by: jhb > Differential Revision: https://reviews.freebsd.org/D7399 > > Modified: > stable/11/usr.bin/truss/setup.c > Directory Properties: > stable/11/ (props changed) > > Modified: stable/11/usr.bin/truss/setup.c > ============================================================================== > --- stable/11/usr.bin/truss/setup.c Sun Aug 14 22:08:25 2016 (r304103) > +++ stable/11/usr.bin/truss/setup.c Sun Aug 14 22:43:48 2016 (r304104) > @@ -223,8 +223,10 @@ add_threads(struct trussinfo *info, stru > t = new_thread(p, lwps[i]); > if (ptrace(PT_LWPINFO, lwps[i], (caddr_t)&pl, sizeof(pl)) == -1) > err(1, "ptrace(PT_LWPINFO)"); > - if (pl.pl_flags & PL_FLAG_SCE) > + if (pl.pl_flags & PL_FLAG_SCE) { > + info->curthread = t; > enter_syscall(info, t, &pl); > + } > } > free(lwps); > } >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?e29a2e1d-02cc-588c-318d-9bf1c07c9ab6>