<!DOCTYPE html>
<!-- BaNnErBlUrFlE-BoDy-start -->
<!-- Preheader Text : BEGIN -->
<div style="display:none !important;display:none;visibility:hidden;mso-hide:all;font-size:1px;color:#ffffff;line-height:1px;max-height:0px;opacity:0;overflow:hidden;">
On 30 Oct 2026, Kris Van Hees uttered the following: > All module BTF (except vmlinux) share a common ancestor (the BTF data of > the vmlinux module). Represent this with a btf->parent reference. > > For vmlinux, btf->parent</div>
<!-- Preheader Text : END -->
<!-- Email Banner : BEGIN -->
<div style="display:none !important;display:none;visibility:hidden;mso-hide:all;font-size:1px;color:#ffffff;line-height:1px;max-height:0px;opacity:0;overflow:hidden;"></div>
<!-- Email Banner : END -->
<!-- BaNnErBlUrFlE-BoDy-end -->
<html>
<head><!-- BaNnErBlUrFlE-HeAdEr-start -->
<style>
#pfptBannermmii3z3 { all: revert !important; display: block !important;
visibility: visible !important; opacity: 1 !important;
background-color: #c2d4d4 !important;
max-width: none !important; max-height: none !important }
.pfptPrimaryButtonmmii3z3:hover, .pfptPrimaryButtonmmii3z3:focus {
background-color: #a2b1b1 !important; }
.pfptPrimaryButtonmmii3z3:active {
background-color: #828e8e !important; }
html:root, html:root>body { all: revert !important; display: block !important;
visibility: visible !important; opacity: 1 !important; }
</style>
<!-- BaNnErBlUrFlE-HeAdEr-end -->
</head><body><pre style="font-family: sans-serif; font-size: 100%; white-space: pre-wrap; word-wrap: break-word">On 30 Oct 2026, Kris Van Hees uttered the following:
> All module BTF (except vmlinux) share a common ancestor (the BTF data of
> the vmlinux module). Represent this with a btf->parent reference.
>
> For vmlinux, btf->parent will be NULL.
This seems like a good idea regardless.
> Signed-off-by: Kris Van Hees <kris.van.hees@oracle.com>
Reviewed-by: Nick Alcock <nix@esperi.org.uk>
> ---
> libdtrace/dt_btf.c | 517 +++++++++++++---------
> libdtrace/dt_btf.h | 19 +-
> libdtrace/dt_impl.h | 2 +-
> libdtrace/dt_module.c | 18 +-
> libdtrace/dt_open.c | 2 -
> libdtrace/dt_prov_fbt.c | 16 +-
> test/unittest/btf/test.x | 8 +
> test/unittest/btf/tst.elf-vmlinux.sh | 31 ++
> test/unittest/btf/tst.elf-vmlinux.x | 8 +
> test/unittest/btf/tst.invalid-fallback.sh | 31 ++
> test/unittest/btf/tst.invalid-fallback.x | 8 +
> test/unittest/btf/tst.module-btf.sh | 46 ++
> test/unittest/btf/tst.module-btf.x | 13 +
> test/unittest/btf/tst.module-local.sh | 63 +++
> test/unittest/btf/tst.module-local.x | 18 +
> test/unittest/btf/tst.module-parent.sh | 46 ++
> test/unittest/btf/tst.module-parent.x | 13 +
> test/unittest/btf/tst.raw-vmlinux.sh | 30 ++
> test/unittest/options/tst.ctf-only.sh | 27 ++
> test/unittest/options/tst.ctf-only.x | 8 +
> 20 files changed, 693 insertions(+), 231 deletions(-)
> create mode 100755 test/unittest/btf/test.x
> create mode 100755 test/unittest/btf/tst.elf-vmlinux.sh
> create mode 100755 test/unittest/btf/tst.elf-vmlinux.x
> create mode 100755 test/unittest/btf/tst.invalid-fallback.sh
> create mode 100755 test/unittest/btf/tst.invalid-fallback.x
> create mode 100755 test/unittest/btf/tst.module-btf.sh
> create mode 100755 test/unittest/btf/tst.module-btf.x
> create mode 100755 test/unittest/btf/tst.module-local.sh
> create mode 100755 test/unittest/btf/tst.module-local.x
> create mode 100755 test/unittest/btf/tst.module-parent.sh
> create mode 100755 test/unittest/btf/tst.module-parent.x
> create mode 100755 test/unittest/btf/tst.raw-vmlinux.sh
> create mode 100755 test/unittest/options/tst.ctf-only.sh
> create mode 100755 test/unittest/options/tst.ctf-only.x
>
> diff --git a/libdtrace/dt_btf.c b/libdtrace/dt_btf.c
> index dce44987..194a251c 100644
> --- a/libdtrace/dt_btf.c
> +++ b/libdtrace/dt_btf.c
> @@ -32,8 +32,8 @@ struct dt_btf {
> size_t size; /* raw BTF data size */
> btf_header_t *hdr; /* BTF header */
> char *sdata; /* string data */
> - uint32_t ssize; /* string data size */
(this seems to be unused, so dropping it is ok.)
> + /*
> + * If we were not able to read the BTF data, and we are constructing
> + * 'shared_ctf', we need space for the default 'void' type.
> + */
Isn't shared_ctf already gone by this point?
--
NULL && (void)
</pre></body></html>