mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-03 05:12:28 +08:00

When we add a type from a dictionary and then try to add it again, we should hand it back unchanged unless it is a structure, union or enum with a different number of members. That's what the comment says we do. Instead, we hand it back unchanged *only* if it is a structure, union or enum with the same number of members: non-structs, unions and enums are unconditionally added. This causes extreme type bloating and (in conjunction with the bug fixed by the next commit) can easily lead to the same type being mistakenly added to a dictionary more than once (which, for forwards, was not banned and led to dictionary corruption). libctf/ * ctf-create.c (ctf_add_type_internal): Hand back existing types unchanged.