freebsd-dev/cddl
Mark Johnston b0ee912984 CTF containers use the ctf_dtoldid field as a threshold type index which
indicates the range of type indices which have been committed to the
container by ctf_update(). However, the top bit of the dtd_type field is
not part of the type index; rather, it is a flag used to indicate that the
corresponding CTF container is a parent. This is why the maximum CTF type
index is 2^15 - 1 rather than 2^16 - 1. Therefore, this flag must be masked
off (using the CTF_TYPE_TO_INDEX macro) when comparing a type index with the
ctf_dtoldid field of a container.

This bug was causing libctf to erroneously free committed type definitions
in ctf_discard(). libdtrace holds some references to such types, resulting
in a use-after-free.

MFC after:	2 weeks
Sponsored by:	EMC / Isilon Storage Division
2015-03-10 21:08:58 +00:00
..
compat/opensolaris Use calloc() instead of malloc() + bzero(). This also gets rid of a warning 2014-12-08 06:10:47 +00:00
contrib CTF containers use the ctf_dtoldid field as a threshold type index which 2015-03-10 21:08:58 +00:00
lib Initial version of DTrace on ARM32. 2015-02-10 19:41:30 +00:00
sbin MFV r267565: 2014-07-01 06:43:15 +00:00
tests Add placeholder Kyuafiles for various top-level hierarchies. 2014-04-21 21:39:25 +00:00
usr.bin These CTF tools do not use anything from libctf, so no need to link with it. 2015-02-27 22:10:31 +00:00
usr.sbin Add infrastructure to integrate the DTrace test suite with Kyua. 2015-02-28 23:30:06 +00:00
Makefile Use src.opts.mk in preference to bsd.own.mk except where we need stuff 2014-05-06 04:22:01 +00:00
Makefile.inc Make DTrace stuff compile with C99 standard. 2014-08-22 20:04:51 +00:00