mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-14 14:55:41 +00:00
4196f227aa
If one of two pointers refers to a forward declaration, let the pointers be compatible so long as the referred types have the same name. Otherwise we can get spurious errors. To give a specific example, this can happen when ipfw_nat.ko is loaded before ipfw.ko and /usr/lib/dtrace/ipfw.d is processed. Currently, ipfw_nat.ko does not have a definition for struct inpcb (i.e., none of its files include in_pcb.h), so in the CTF type graph, struct ip_fw_args' "inp" member refers to a forward declaration, represented in CTF with CTF_K_FORWARD. Then, when libdtrace processes the ipfw_match_info_t translator in ipfw.d, it decides that the "inp" field assignment is incorrect because the two pointers are incompatible. However, there's no harm in allowing this assignment. Add some logic to dt_node_is_ptrcompat() to detect this case and declare the pointers as compatible so long as the name of the thing they refer to is the same, similar to how any pointer is compatible with a void *. Reported by: marck Reviewed by: Domagoj Stolfa <domagoj.stolfa@gmail.com> MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D48254 |
||
---|---|---|
.. | ||
compat/opensolaris | ||
contrib/opensolaris | ||
lib | ||
sbin | ||
share | ||
tests | ||
usr.bin | ||
usr.libexec | ||
usr.sbin | ||
Makefile | ||
Makefile.inc |