Date: Sun, 25 Sep 2011 18:50:54 -0400 From: Ryan Stone <rysto32@gmail.com> To: FreeBSD Current <freebsd-current@freebsd.org> Subject: [PATCH] dtrace crashes when trying to trace fbt probes without CTF data Message-ID: <CAFMmRNzXBmt7=WH27V92u%2Bq=pUaW49qx=K4Ei-EM75dVwbmaBQ@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
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?
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAFMmRNzXBmt7=WH27V92u%2Bq=pUaW49qx=K4Ei-EM75dVwbmaBQ>