Date: Mon, 19 Dec 2016 18:47:42 +0900 (JST) From: Hiroki Sato <hrs@FreeBSD.org> To: mahrens@delphix.com Cc: freebsd-dtrace@freebsd.org Subject: Re: clause-local variable with copyin() Message-ID: <20161219.184742.786839951753685882.hrs@allbsd.org> In-Reply-To: <CAJjvXiHScMOhCb7kVoSgPHgccXkmNo_c1ysFBXnyrqj4ehJeUw@mail.gmail.com> References: <20161217.151014.1579687141761225852.hrs@allbsd.org> <CAJjvXiHScMOhCb7kVoSgPHgccXkmNo_c1ysFBXnyrqj4ehJeUw@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
----Security_Multipart(Mon_Dec_19_18_47_42_2016_121)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Matthew Ahrens <mahrens@delphix.com> wrote in <CAJjvXiHScMOhCb7kVoSgPHgccXkmNo_c1ysFBXnyrqj4ehJeUw@mail.gmail.com>: ma> On Fri, Dec 16, 2016 at 10:10 PM, Hiroki Sato <hrs@freebsd.org> wrote: ma> > The symptom varied depending on the address of this->st, so I am ma> > guessing that this->st was incorrectly freed at the end of the first ma> > probe. If I use copyinstr(arg0) instead of copyin(), this problem ma> > does not occur. ma> > ma> ma> Perhaps this is a bug (or at least, unexpected behavior) with copyin(). I ma> assume that it works fine with simple data types (e.g. numbers). Yes, it happens only when using copyin(). ma> I tried to test out your script on illumos but I got as far as this before ma> running out of time: ma> ma> dtrace -h -s sample_probes.d ma> gcc -c sample.c ma> dtrace -G -s sample_probes.d sample.o ma> gcc -o sample sample.o ma> dtrace -s sample_debug.d -c ./sample ma> dtrace: failed to compile script sample_debug.d: line 1: 'dump-str' is an ma> invalid probe name I confirmed that illumos-2816291 reproduced the same behavior. The sample_probes.o file should be linked to create a "sample" binary like this: % gcc -o sample sample.o sample_probes.o -- Hiroki ----Security_Multipart(Mon_Dec_19_18_47_42_2016_121)-- Content-Type: application/pgp-signature Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEABECAAYFAlhXrL4ACgkQTyzT2CeTzy0MZwCgn0HV3KRK9eeJ/DPQE9I8HFH9 E+8AoML4n9WXM9TakjsabcCLwf2NS4Ba =zE8G -----END PGP SIGNATURE----- ----Security_Multipart(Mon_Dec_19_18_47_42_2016_121)----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20161219.184742.786839951753685882.hrs>