The bug involves synthesising pointers to types (ipaddr_t *, in
particular) when such pointer types do not appear in the CTF files but
are needed by the CTF itself. This is working in standalone modules,
but not in modules with parent type containers.
As a workaround, pro tem before fixing this properly in libdtrace-ctf,
hack around it for the one type it is necessary for (a type that is used
in the DTrace system translators, so if this type does not resolve
correctly DTrace will not start). A suitable workaround is simply to
introduce a use of this pointer type in the C code, and it so happens
that we have a place where this would fit perfectly well.
Orabug:
26583958
Signed-off-by: Nick Alcock <nick.alcock@oracle.com>
Reviewed-by: Tomas Jedlicka <tomas.jedlicka@oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees@oracle.com>
src = tupregs[argi].dttk_value;
if (af == AF_INET) {
ipaddr_t ip4;
+ ipaddr_t_p ptr4;
uint8_t *ptr8, val;
/*
* Stringify as a dotted decimal quad.
*/
*end-- = '\0';
- ptr8 = (uint8_t *)&ip4;
+ ptr4 = &ip4;
+ ptr8 = (uint8_t *)ptr4;
for (i = 3; i >= 0; i--) {
val = ptr8[i];
typedef uintptr_t dtrace_meta_provider_id_t;
typedef struct cred cred_t;
typedef __be32 ipaddr_t;
+typedef ipaddr_t * ipaddr_t_p;
typedef struct in6_addr in6_addr_t;
struct dtrace_pops;