Binutils with MCST patches
e4df087431
Valgrind reports the below leak. Make the variable progname_copy static, so that Valgrind continues to find a pointer to the memory given to Python. Note that the comment in do_start_initialization and the Python documentation indicates that the progname given to Py_SetProgramName cannot be freed. However, in Python 3.7.4, Py_SetProgramName does: void Py_SetProgramName(const wchar_t *program_name) { ... PyMem_RawFree(_Py_path_config.program_name); _Py_path_config.program_name = _PyMem_RawWcsdup(program_name); So, it looks like 3.7.4 Python duplicates its argument, which explains the leak found by Valgrind. It looks better to respect the doc and not have GDB freeing the string given to Py_SetProgramName, and avoid the leak error by declaring the progname_copy static. This will work with Python versions that really use this string without duplicating it, and avoids a leak report for Python version that duplicates it. ==4023== 200 bytes in 1 blocks are definitely lost in loss record 4,545 of 7,116^M ==4023== at 0x4C29F33: malloc (vg_replace_malloc.c:307)^M ==4023== by 0x446D27: xmalloc (alloc.c:60)^M ==4023== by 0x657C77: do_start_initialization (python.c:1610)^M ==4023== by 0x657C77: _initialize_python() (python.c:1823)^M ==4023== by 0x75FE24: initialize_all_files() (init.c:231)^M ==4023== by 0x708A94: gdb_init(char*) (top.c:2242)^M ==4023== by 0x5E7460: captured_main_1 (main.c:857)^M ==4023== by 0x5E7460: captured_main (main.c:1161)^M ==4023== by 0x5E7460: gdb_main(captured_main_args*) (main.c:1186)^M ==4023== by 0x4122D4: main (gdb.c:32)^M gdb/ChangeLog 2019-09-09 Philippe Waroquiers <philippe.waroquiers@skynet.be> * python/python.c (do_start_initialization): Make progname_copy static, to avoid a leak report. |
||
---|---|---|
bfd | ||
binutils | ||
config | ||
contrib | ||
cpu | ||
elfcpp | ||
etc | ||
gas | ||
gdb | ||
gnulib | ||
gold | ||
gprof | ||
include | ||
intl | ||
ld | ||
libctf | ||
libdecnumber | ||
libiberty | ||
opcodes | ||
readline | ||
sim | ||
texinfo | ||
zlib | ||
.cvsignore | ||
.gitattributes | ||
.gitignore | ||
ar-lib | ||
ChangeLog | ||
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.