binutils-gdb/binutils/testsuite/binutils-all
Nick Clifton af03af8f55 Synchronize libiberty with gcc and add --no-recruse-limit option to tools that support name demangling.
This patch addresses the multitude of bug reports about resource exhaustion
in libiberty's name demangling code.  It adds a limit to the amount of
recursion that is allowed, before an error is triggered.  It also adds a
new demangling option to disable this limit.  (The limit is enabled by
default).

	PR 87681
	PR 87675
	PR 87636
	PR 87335
libiberty * cp-demangle.h (struct d_info): Add recursion_limit field.
	* cp-demangle.c (d_function_type): If the recursion limit is
	enabled and reached, return with a failure result.
        (d_demangle_callback): If the recursion limit is enabled, check
	for a mangled string that is so long that there is not enough
	stack space for the local arrays.
        * cplus-dem.c (struct work): Add recursion_level field.
	(demangle_nested_args): If the recursion limit is enabled and
	reached, return with a failure result.

include	* demangle.h (DMGL_RECURSE_LIMIT): Define.
        (DEMANGLE_RECURSION_LIMIT): Prototype.

binutuils * addr2line.c (demangle_flags): New static variable.
        (long_options): Add --recurse-limit and --no-recurse-limit.
        (translate_address): Pass demangle_flags to bfd_demangle.
        (main): Handle --recurse-limit and --no-recurse-limit options.
        * cxxfilt.c (flags): Add DMGL_RECURSE_LIMIT.
        (long_options): Add --recurse-limit and --no-recurse-limit.
        (main): Handle new options.
        * dlltool.c (gen_def_file): Include DMGL_RECURSE_LIMIT in flags
        passed to cplus_demangle.
        * nm.c (demangle_flags): New static variable.
        (long_options): Add --recurse-limit and --no-recurse-limit.
        (main): Handle new options.
        * objdump.c (demangle_flags): New static variable.
        (usage): Add --recurse-limit and --no-recurse-limit.
        (long_options): Likewise.
        (objdump_print_symname): Pass demangle_flags to bfd_demangle.
        (disassemble_section): Likewise.
        (dump_dymbols): Likewise.
        (main): Handle new options.
        * prdbg.c (demangle_flags): New static variable.
        (tg_variable): Pass demangle_flags to demangler.
        (tg_start_function): Likewise.
        * stabs.c (demangle_flags): New static variable.
        (stab_demangle_template): Pass demangle_flags to demangler.
        (stab_demangle_v3_argtypes): Likewise.
        (stab_demangle_v3_arg): Likewise.
	* doc/binutuls.texi: Document new command line options.
	* NEWS: Mention the new feature.
        * testsuite/config/default.exp (CXXFILT): Define if not already
        defined.
        (CXXFILTFLAGS): Likewise.
        * testsuite/binutils-all/cxxfilt.exp: New file.  Runs a few
        simple tests of the cxxfilt program.
2018-12-07 11:32:55 +00:00
..
aarch64 Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
arc Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
arm Remove arm-aout and arm-coff support 2018-04-25 09:38:17 +09:30
bfin Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
hppa Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
i386 Update the assembler to use a version of 3 when generating the header of the .debug_line section. 2018-12-03 17:26:41 +00:00
m68k Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
mips BFD messages 2018-02-26 09:33:15 +10:30
nfp opcodes/nfp: Fix disassembly of crc[] with swapped operands. 2018-11-13 15:33:21 +02:00
vax Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
wasm32 Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
windres Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
x86-64 Update the assembler to use a version of 3 when generating the header of the .debug_line section. 2018-12-03 17:26:41 +00:00
add-empty-section.d Consolidate run_dump_test 2018-09-15 16:56:55 +09:30
add-section.d Consolidate run_dump_test 2018-09-15 16:56:55 +09:30
add-symbol.d Consolidate run_dump_test 2018-09-15 16:56:55 +09:30
alias-2.def
alias.def
ar.exp Add option to ar's 't' command to display the offset of elements within the archive. 2018-05-30 17:08:03 +01:00
bintest.s Enhance objdump's --disassemble switch so that it can now take an optional parameter, specifying the starting symbol for disassembly. Disassembly will continue from this symbol up to the next symbol. 2018-11-07 18:07:36 +00:00
common-1.s
common-1a.d
common-1b.d
common-1c.d
common-1d.d
common-1e.d
common-1f.d
common-2.s
common-2a.d
common-2b.d
common-2c.d
common-2d.d
common-2e.d
common-2f.d
compress.exp Ensure that binutils test names are unique. 2018-09-17 10:10:47 +01:00
copy-1.d
copy-1.s
copy-2.d binutils run_dump_test rename not-target and not-skip 2018-09-15 16:24:18 +09:30
copy-3.d binutils run_dump_test rename not-target and not-skip 2018-09-15 16:24:18 +09:30
copy-4.d binutils run_dump_test rename not-target and not-skip 2018-09-15 16:24:18 +09:30
copy-5.d Prevent the --keep-global-symbol and --globalize-symbol options from being used together. 2018-10-11 11:38:10 +01:00
copytest.s
cxxfilt.exp Synchronize libiberty with gcc and add --no-recruse-limit option to tools that support name demangling. 2018-12-07 11:32:55 +00:00
data-sections.s
debug_str.d
debug_str.s
debuglink.s Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
dlltool.exp Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
dumptest.s
dw2-1.S Add support for the Freescale s12z processor. 2018-05-18 15:26:18 +01:00
dw2-1.W
dw2-2.S Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
dw2-3.rS Handle ELF compressed header alignment correctly by setting up the section alignment correctly for the Elf32_Chdr or Elf64_Chdr type and respect the ch_addralign field when decompressing the section data. 2018-11-27 11:59:10 +00:00
dw2-3.rt Handle ELF compressed header alignment correctly by setting up the section alignment correctly for the Elf32_Chdr or Elf64_Chdr type and respect the ch_addralign field when decompressing the section data. 2018-11-27 11:59:10 +00:00
dw2-3.S Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
dw2-3.W
dw2-3gabi.W
dw2-compressed.S Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
dw2-decodedline-1.S
dw2-decodedline.S
dw2-empty.S
dw2-ranges.S Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
dw2-ranges.W
dw5.S Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
dw5.W binutils --dwarf=decodedline: Add display of is_stmt flag 2018-09-20 19:02:50 +02:00
dwarf-attributes.S Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
dwarf-attributes.W
dwo.s Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
elfedit-1.d binutils run_dump_test rename not-target and not-skip 2018-09-15 16:24:18 +09:30
elfedit-2.d [ARM] FDPIC: Update testsuite so that many tests pass with arm*-uclinuxfdpiceabi. 2018-04-25 21:13:14 +00:00
elfedit-3.d [ARM] FDPIC: Update testsuite so that many tests pass with arm*-uclinuxfdpiceabi. 2018-04-25 21:13:14 +00:00
elfedit-4.d
elfedit-5.d
elfedit.exp Consolidate run_dump_test 2018-09-15 16:56:55 +09:30
empty
empty-file
empty.s
exclude-1.s
exclude-1a.d
exclude-1b.d
fastcall.def
group-2.s
group-3.s
group-4.s
group-5.d Andes Technology has good news for you, we plan to update the nds32 port of binutils on upstream! 2018-09-20 13:32:58 +01:00
group-5.s
group-6.d
group-6.s
group-7.s PR22836, "-r -s" doesn't work with -g3 using GCC 7 2018-02-13 22:55:49 +10:30
group-7a.d Remove run_dump_test support for objcopy as a dump program 2018-09-15 16:24:18 +09:30
group-7b.d Remove run_dump_test support for objcopy as a dump program 2018-09-15 16:24:18 +09:30
group-7c.d Remove run_dump_test support for objcopy as a dump program 2018-09-15 16:24:18 +09:30
group.s
libdw2-compressed.out
libdw2-compressedgabi.out
libdw2.out
link-order.s
linkdebug.s Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
localize-hidden-1.d
localize-hidden-1.s
localize-hidden-2.d
localize-hidden-2.s
locview-1.s
locview-2.s
mbind1.s
needed-by-reloc.s
nm-1.s
nm-elf-1.s
nm-ver.s
nm.exp Remove sony newsos3 support 2018-04-16 15:13:07 +09:30
note-1.d Consolidate run_dump_test 2018-09-15 16:56:55 +09:30
note-2-32.d Add support for v3 binary annotation notes. 2018-01-03 10:30:07 +00:00
note-2-32.s Add support for v3 binary annotation notes. 2018-01-03 10:30:07 +00:00
note-2-64.d binutils run_dump_test rename not-target and not-skip 2018-09-15 16:24:18 +09:30
note-2-64.s Add support for v3 binary annotation notes. 2018-01-03 10:30:07 +00:00
note-3-32.d Add support for v3 binary annotation notes. 2018-01-03 10:30:07 +00:00
note-3-32.s Add support for v3 binary annotation notes. 2018-01-03 10:30:07 +00:00
note-3-64.d Add support for v3 binary annotation notes. 2018-01-03 10:30:07 +00:00
note-3-64.s Add support for v3 binary annotation notes. 2018-01-03 10:30:07 +00:00
note-3.32.s
note-4-32.d Improve readelf's selection of a file start symbol when displaying a gnu build attribute. 2018-03-23 12:20:03 +00:00
note-4-32.s Improve readelf's selection of a file start symbol when displaying a gnu build attribute. 2018-03-23 12:20:03 +00:00
note-4-64.d Add support for v3 binary annotation notes. 2018-01-03 10:30:07 +00:00
note-4-64.s Improve readelf's selection of a file start symbol when displaying a gnu build attribute. 2018-03-23 12:20:03 +00:00
note-5.d Extend the assembler so that it can automatically generate GNU Build attribute notes if none are present in the input files. 2018-04-26 15:12:42 +01:00
note-5.s Extend the assembler so that it can automatically generate GNU Build attribute notes if none are present in the input files. 2018-04-26 15:12:42 +01:00
objcopy.exp Enhance objdump's --disassemble switch so that it can now take an optional parameter, specifying the starting symbol for disassembly. Disassembly will continue from this symbol up to the next symbol. 2018-11-07 18:07:36 +00:00
objdump.exp Enhance objdump's --disassemble switch so that it can now take an optional parameter, specifying the starting symbol for disassembly. Disassembly will continue from this symbol up to the next symbol. 2018-11-07 18:07:36 +00:00
objdump.s
objdump.W
objdump.Wk
objdump.WK2
objdump.WL binutils --dwarf=decodedline: Add display of is_stmt flag 2018-09-20 19:02:50 +02:00
only-section-01.d
pr18374.s
pr19020.in
pr19020a.d
pr19020b.d
pr19547.c
pr23633.d Consolidate run_dump_test 2018-09-15 16:56:55 +09:30
pr23633.list Add a testcase for PR binutils/23633 2018-09-13 09:09:15 -07:00
pr23633.s Add a testcase for PR binutils/23633 2018-09-13 09:09:15 -07:00
readelf.exp Ensure that binutils test names are unique. 2018-09-17 10:10:47 +01:00
readelf.h
readelf.k
readelf.k2
readelf.locview-1
readelf.locview-2
readelf.n
readelf.pr18374
readelf.r
readelf.r-64
readelf.s Enhance objdump's --disassemble switch so that it can now take an optional parameter, specifying the starting symbol for disassembly. Disassembly will continue from this symbol up to the next symbol. 2018-11-07 18:07:36 +00:00
readelf.s-64 binutils: Adjusted tests for .note.gnu.property section 2018-08-31 04:38:25 -07:00
readelf.ss Enhance objdump's --disassemble switch so that it can now take an optional parameter, specifying the starting symbol for disassembly. Disassembly will continue from this symbol up to the next symbol. 2018-11-07 18:07:36 +00:00
readelf.ss-64 Enhance objdump's --disassemble switch so that it can now take an optional parameter, specifying the starting symbol for disassembly. Disassembly will continue from this symbol up to the next symbol. 2018-11-07 18:07:36 +00:00
readelf.ss-mips Enhance objdump's --disassemble switch so that it can now take an optional parameter, specifying the starting symbol for disassembly. Disassembly will continue from this symbol up to the next symbol. 2018-11-07 18:07:36 +00:00
readelf.ss-tmips Enhance objdump's --disassemble switch so that it can now take an optional parameter, specifying the starting symbol for disassembly. Disassembly will continue from this symbol up to the next symbol. 2018-11-07 18:07:36 +00:00
readelf.wa
readelf.z
remove-relocs-01.d Support objcopy --remove-section=.relaFOO 2018-09-17 23:31:18 +09:30
remove-relocs-01.s
remove-relocs-02.d
remove-relocs-03.d
remove-relocs-04.d Support objcopy --remove-section=.relaFOO 2018-09-17 23:31:18 +09:30
remove-relocs-05.d Support objcopy --remove-section=.relaFOO 2018-09-17 23:31:18 +09:30
remove-relocs-06.d Support objcopy --remove-section=.relaFOO 2018-09-17 23:31:18 +09:30
remove-relocs-07.d Support objcopy --remove-section=.relaFOO 2018-09-17 23:31:18 +09:30
remove-relocs-07.s Support objcopy --remove-section=.relaFOO 2018-09-17 23:31:18 +09:30
remove-relocs-08.d Support objcopy --remove-section=.relaFOO 2018-09-17 23:31:18 +09:30
remove-section-01.d
size.exp Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
strings-1.bin Enhance the strings program so that it can display multibyte strings. 2018-11-09 12:48:23 +00:00
strings.exp Enhance the strings program so that it can display multibyte strings. 2018-11-09 12:48:23 +00:00
strip-1.d
strip-2.d Andes Technology has good news for you, we plan to update the nds32 port of binutils on upstream! 2018-09-20 13:32:58 +01:00
strip-3.d binutils: Adjusted tests for .note.gnu.property section 2018-08-31 04:38:25 -07:00
strip-4.d
strip-5.d Andes Technology has good news for you, we plan to update the nds32 port of binutils on upstream! 2018-09-20 13:32:58 +01:00
strip-6.d
strip-7.d Andes Technology has good news for you, we plan to update the nds32 port of binutils on upstream! 2018-09-20 13:32:58 +01:00
strip-8.d
strip-9.d Andes Technology has good news for you, we plan to update the nds32 port of binutils on upstream! 2018-09-20 13:32:58 +01:00
strip-10.d
strip-11.d binutils run_dump_test rename not-target and not-skip 2018-09-15 16:24:18 +09:30
strip-12.d
strip-12.s
strip-13.d binutils run_dump_test rename not-target and not-skip 2018-09-15 16:24:18 +09:30
strip-13mips64.s Adjust some strip testcases to silence h8300 warnings 2018-09-17 23:16:48 +09:30
strip-13rel.s Adjust some strip testcases to silence h8300 warnings 2018-09-17 23:16:48 +09:30
strip-13rela.s Adjust some strip testcases to silence h8300 warnings 2018-09-17 23:16:48 +09:30
strip-14.d binutils run_dump_test rename not-target and not-skip 2018-09-15 16:24:18 +09:30
strip-14mips64.s Adjust some strip testcases to silence h8300 warnings 2018-09-17 23:16:48 +09:30
strip-14rel.s Adjust some strip testcases to silence h8300 warnings 2018-09-17 23:16:48 +09:30
strip-14rela.s Adjust some strip testcases to silence h8300 warnings 2018-09-17 23:16:48 +09:30
strip-15.d Fix some strip test fails on nds32 and pru 2018-04-10 09:41:25 +09:30
strip-15mips64.s Adjust some strip testcases to silence h8300 warnings 2018-09-17 23:16:48 +09:30
strip-15rel.s Adjust some strip testcases to silence h8300 warnings 2018-09-17 23:16:48 +09:30
strip-15rela.s Adjust some strip testcases to silence h8300 warnings 2018-09-17 23:16:48 +09:30
symbols-1.d Consolidate run_dump_test 2018-09-15 16:56:55 +09:30
symbols-2.d Consolidate run_dump_test 2018-09-15 16:56:55 +09:30
symbols-3.d Consolidate run_dump_test 2018-09-15 16:56:55 +09:30
symbols-4.d Consolidate run_dump_test 2018-09-15 16:56:55 +09:30
symbols.s
testprog.c
testranges-ia64.d
testranges-ia64.s
testranges.d binutils run_dump_test rename not-target and not-skip 2018-09-15 16:24:18 +09:30
testranges.s
unique.s
unknown.s
update-1.s
update-2.s
update-3.s
update-4.s
update-section.exp Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
version.def
version.s
z.s