Go to file
Nick Alcock 999e7ed7a2 libctf: ctf-link outdated input check faulty
This check has a pair of faults which, combined, can lead to memory
corruption.  Firstly, it assumes that the values of the ctf_link_inputs
hash are ctf_dict_t's: they are not, they are ctf_link_input_t's, a much
shorter structure.  So the flags check which is the core of this is
faulty (but happens, by chance, to give the right output on most
architectures, since usually we happen to get a 0 here, so the test that
checks this usually passes).  Worse, the warning that is emitted when
the test fails is added to the wrong dict -- it's added to the input
dict, whose warning list is never consumed, rendering the whole check
useless.  But the dict it adds to is still the wrong type, so we end up
overwriting something deep in memory (or, much more likely,
dereferencing a garbage pointer and crashing).

Fixing both reveals another problem: the link input is an *archive*
consisting of multiple members, so we have to consider whether to check
all of them for the outdated-func-info thing we are checking here.
However, no compiler exists that emits a mixture of members with this
flag on and members with it off, and the linker always reserializes (and
upgrades) such things when it sees them: so all members in a given
archive must have the same value of the flag, so we only need to check
one member per input archive.

libctf/
	PR libctf/29983
	* ctf-link.c (ctf_link_warn_outdated_inputs): Get the types of
        members of ctf_link_inputs right, fixing a possible spurious
        tesst failure / wild pointer deref / overwrite.  Emit the
        warning message into the right dict.
2023-01-12 15:23:51 +00:00
bfd Automatic date update in version.in 2023-01-12 00:02:07 +00:00
binutils Updated transaltions for the gprof and binutils sub-directories 2023-01-09 10:23:27 +00:00
config Merge config/picflag.m4 from gcc 2023-01-04 22:14:03 +10:30
contrib
cpu Add markers for 2.40 branch 2022-12-31 12:05:28 +00:00
elfcpp Update year range in copyright notice of binutils files 2023-01-04 22:14:02 +10:30
etc Update year range in gprofng copyright notices 2023-01-04 22:14:03 +10:30
gas gas/RISC-V: adjust assembler for opcode table re-ordering 2023-01-11 10:35:54 +01:00
gdb [gdb/cli] Add maintenance ignore-probes 2022-12-31 10:23:06 +01:00
gdbserver
gdbsupport
gnulib
gold Update year range in copyright notice of binutils files 2023-01-04 22:14:02 +10:30
gprof Updated transaltions for the gprof and binutils sub-directories 2023-01-09 10:23:27 +00:00
gprofng Update year range in gprofng copyright notices 2023-01-04 22:14:03 +10:30
include sframe: fix the defined SFRAME_FRE_TYPE_*_LIMIT constants 2023-01-09 09:47:42 -08:00
intl
ld IBM zSystems: Fix offset relative to static TLS 2023-01-10 14:51:47 +01:00
libbacktrace Ensure that libbacktrace/allocfail.sh is not deleted when creating release tarballs. 2023-01-12 13:37:59 +00:00
libctf libctf: ctf-link outdated input check faulty 2023-01-12 15:23:51 +00:00
libdecnumber
libiberty Merge config/picflag.m4 from gcc 2023-01-04 22:14:03 +10:30
libsframe sframe: fix the defined SFRAME_FRE_TYPE_*_LIMIT constants 2023-01-09 09:47:42 -08:00
opcodes Update year range in copyright notice of binutils files 2023-01-04 22:14:02 +10:30
readline
sim
texinfo
zlib
.cvsignore
.editorconfig
.gitattributes
.gitignore
ar-lib
ChangeLog Add markers for 2.40 branch 2022-12-31 12:05:28 +00:00
compile
config-ml.in
config.guess
config.rpath
config.sub
configure
configure.ac
COPYING
COPYING3
COPYING3.LIB
COPYING.LIB
COPYING.LIBGLOSS
COPYING.NEWLIB
depcomp
djunpack.bat
install-sh
libtool.m4
lt~obsolete.m4
ltgcc.m4
ltmain.sh
ltoptions.m4
ltsugar.m4
ltversion.m4
MAINTAINERS
Makefile.def
Makefile.in
Makefile.tpl
makefile.vms
missing
mkdep
mkinstalldirs
move-if-change
multilib.am
README
README-maintainer-mode
setup.com
src-release.sh
symlink-tree
test-driver
ylwrap

		   README for GNU development tools

This directory contains various GNU compilers, assemblers, linkers, 
debuggers, etc., plus their support routines, definitions, and documentation.

If you are receiving this as part of a GDB release, see the file gdb/README.
If with a binutils release, see binutils/README;  if with a libg++ release,
see libg++/README, etc.  That'll give you info about this
package -- supported targets, how to use it, how to report bugs, etc.

It is now possible to automatically configure and build a variety of
tools with one command.  To build all of the tools contained herein,
run the ``configure'' script here, e.g.:

	./configure 
	make

To install them (by default in /usr/local/bin, /usr/local/lib, etc),
then do:
	make install

(If the configure script can't determine your type of computer, give it
the name as an argument, for instance ``./configure sun4''.  You can
use the script ``config.sub'' to test whether a name is recognized; if
it is, config.sub translates it to a triplet specifying CPU, vendor,
and OS.)

If you have more than one compiler on your system, it is often best to
explicitly set CC in the environment before running configure, and to
also set CC when running make.  For example (assuming sh/bash/ksh):

	CC=gcc ./configure
	make

A similar example using csh:

	setenv CC gcc
	./configure
	make

Much of the code and documentation enclosed is copyright by
the Free Software Foundation, Inc.  See the file COPYING or
COPYING.LIB in the various directories, for a description of the
GNU General Public License terms under which you can copy the files.

REPORTING BUGS: Again, see gdb/README, binutils/README, etc., for info
on where and how to report problems.