Current-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: dtracing unlink
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 mkrepro%mkrepro.NetBSD.org@localhost:/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;
}
```
And, forget that C file. It doesn't work under dtrace (and I don't even
recall if it ever did--probably why I commented it out...)
-RVP
Home |
Main Index |
Thread Index |
Old Index