mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
std: it is important that func name is never an empty string
otherwise DTRACE_ANCHORED() returns false and that makes stack()
insert a bogus frame at the top.
For example:
dtrace -n 'test:dtrace_test::sdttest { stack(); }
This change is not really a solution, but just a work-around.
The real solution is to record the probe's call site and to use
that for resolving a function name.
PR: 195222
MFC after: 22 days
This commit is contained in:
parent
09999d92b1
commit
3bd9b9a600
1 changed files with 2 additions and 0 deletions
|
|
@ -168,6 +168,8 @@ sdt_create_probe(struct sdt_probe *probe)
|
|||
* in the C compiler, so we have to respect const vs non-const.
|
||||
*/
|
||||
strlcpy(func, probe->func, sizeof(func));
|
||||
if (func[0] == '\0')
|
||||
strcpy(func, "none");
|
||||
|
||||
from = probe->name;
|
||||
to = name;
|
||||
|
|
|
|||
Loading…
Reference in a new issue