aboutsummaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorMark Johnston <markj@FreeBSD.org>2015-03-11 00:01:39 +0000
committerMark Johnston <markj@FreeBSD.org>2015-03-11 00:01:39 +0000
commitf810bf0eaf9cae9abe64524c8706875e8fdfa0ec (patch)
tree0c0e85ef123c492fa524f9f386b0110c83929569 /usr.bin
parent1c229658b9d8cd364d8219489a563c0ed58e1567 (diff)
downloadsrc-f810bf0eaf9cae9abe64524c8706875e8fdfa0ec.tar.gz
src-f810bf0eaf9cae9abe64524c8706875e8fdfa0ec.zip
When copying a type from a source CTF container to a destination container,
ctf_add_type() first performs a by-name lookup of the type in the destination container. If this lookup returns a forward declaration for an enum, struct, or union, reset dst_type back to CTF_ERR, indicating that the source type is not in fact present in the destination container. This ensures that ctf_add_type() will also search the destination container's dynamic type list for the source type. Without this change, a pair of mutually recursive struct definitions could cause infinite recursion in ctf_add_type() if the destination container only contained forward declarations for the struct types: ctf_add_type() recursively calls itself on each struct member's type, and the forward declarations meant that the dynamic type list search would be skipped. MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division
Notes
Notes: svn path=/head/; revision=279869
Diffstat (limited to 'usr.bin')
0 files changed, 0 insertions, 0 deletions