On Sat, Oct 21, 2023 at 06:10:17AM +0000, RVP wrote: > On Fri, 20 Oct 2023, bch wrote: > > > What OS release/architecture are you using that is getting favorable > > results? > > > > $ uname -a > NetBSD x202e.localdomain 10.99.10 NetBSD 10.99.10 (GENERIC) #0: Thu Oct 19 > 23:43:40 UTC 2023 > mkre...@mkrepro.netbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC amd64 > > > I’m following along on ~up-to-the-minute -current AMD64 on my Thinkpad, and > > only seeing the same memory errors as wiz’ original example. > > > > Do the copyinstr in ::entry like this: > > ``` > #!/usr/sbin/dtrace -s > > #pragma D option destructive > #pragma D option quiet > > syscall::unlink:entry > { > self->file = copyinstr(arg0); > } > > syscall::unlink:return > { > printf("%d %s\n", pid, self->file); > self->file = 0; > } > ```
With that I see: # ./dtrace.unlink2 dtrace: buffer size lowered to 1m dtrace: error on enabled probe ID 1 (ID 404: syscall::unlink:entry): invalid address (0xc000048240) in action #1 at DIF offset 12 : No such file or directory dtrace: error on enabled probe ID 2 (ID 405: syscall::unlink:return): invalid address (0x0) in action #2 : No such file or directory Thomas