[PATCH] dtrace crashes when trying to trace fbt probes without CTF
data
Ryan Stone
rysto32 at gmail.com
Sun Sep 25 22:50:55 UTC 2011
I get a panic if I try to run a dtrace script that uses an fbt probe
from a module that does not have CTF data. The polling patch resolves
the issue for me:
Index: sys/cddl/dev/fbt/fbt.c
===================================================================
--- sys/cddl/dev/fbt/fbt.c (revision 225756)
+++ sys/cddl/dev/fbt/fbt.c (working copy)
@@ -1261,7 +1261,7 @@
desc->dtargd_ndx = DTRACE_ARGNONE;
/* Get a pointer to the CTF data and it's length. */
- if (linker_ctf_get(ctl, &lc) != 0)
+ if (linker_ctf_get(ctl, &lc) != 0 || lc.ctfoffp == NULL)
/* No CTF data? Something wrong? *shrug* */
return;
However, I'm not entirely sure whether this is the correct approach to
fixing the problem(making linker_ctf_get() return an error seems to
break dtrace entirely). Does anybody who has familiarity with
dtrace's internals have an opinion?
More information about the freebsd-current
mailing list