diff options
author | Nick Alcock <nick.alcock@oracle.com> | 2025-03-25 12:05:51 +0000 |
---|---|---|
committer | Nick Alcock <nick.alcock@oracle.com> | 2025-03-25 12:05:51 +0000 |
commit | 44ae93ddf0de3b5852cbdc0ea13145b516873f9d (patch) | |
tree | c906198ba4bdae3e1eb357d66a8edd5a005dec8b /libctf/ctf-create.c | |
parent | edbb35084986f2dd18546b204c2299da6779e30b (diff) | |
download | binutils-44ae93ddf0de3b5852cbdc0ea13145b516873f9d.zip binutils-44ae93ddf0de3b5852cbdc0ea13145b516873f9d.tar.gz binutils-44ae93ddf0de3b5852cbdc0ea13145b516873f9d.tar.bz2 |
libctf: create: all decl tags have the same vlen_size
Decl tags with nonzero component_idxes don't have a zero-sized vlen!
Diffstat (limited to 'libctf/ctf-create.c')
-rw-r--r-- | libctf/ctf-create.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libctf/ctf-create.c b/libctf/ctf-create.c index 117c276..deed75d 100644 --- a/libctf/ctf-create.c +++ b/libctf/ctf-create.c @@ -954,6 +954,8 @@ ctf_add_tag (ctf_dict_t *fp, uint32_t flag, ctf_id_t type, const char *tag, if (is_decl) { + vlen_size = sizeof (ctf_decl_tag_t); + /* Whole-type declarations. */ if (component_idx == 0) @@ -967,7 +969,6 @@ ctf_add_tag (ctf_dict_t *fp, uint32_t flag, ctf_id_t type, const char *tag, /* TODO: support addition and querying on CTF_K_FUNCTION too, chasing back to relevant CTF_K_FUNC_LINKAGEs. */ case CTF_K_FUNC_LINKAGE: - vlen_size = sizeof (ctf_decl_tag_t); break; default: return (ctf_set_typed_errno (fp, ECTF_BADID)); |