]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
When copying types from one CTF container to another, ensure that we
authorjtl <jtl@FreeBSD.org>
Fri, 20 Nov 2020 17:26:02 +0000 (17:26 +0000)
committerjtl <jtl@FreeBSD.org>
Fri, 20 Nov 2020 17:26:02 +0000 (17:26 +0000)
commitda9d13aad5ce3a4facc95762233409c23367c8fa
treef20a4d8c3ebe6d4607a5bb3f1f41d272903c7c20
parentf5a209db338ca95c5e473f950d04de90dbd24078
When copying types from one CTF container to another, ensure that we
encode 0-length (i.e. "") structure and union member names as offset 0.
This ensures that we don't confuse other parts of the CTF code which
expect this encoding.

This resolves a Dtrace error resolving members of anonymous structs/unions
within the (struct mbuf) type which some users were seeing after r366908.

While here, update the code in ctf_add_generic() to encode 0-length type
names as offset 0.

Reviewed by: markj
MFC after: 2 weeks
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D27246
cddl/contrib/opensolaris/common/ctf/ctf_create.c