From e1fa0163505af867009ea73fc5f705162120e795 Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Mon, 21 Mar 2016 16:31:46 +0000 Subject: Remove use of alloca. bfd * warning.m4 (GCC_WARN_CFLAGS): Add -Wstack-usage=262144 * configure: Regenerate. * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Replace use of alloca with call to xmalloc. * elf32-nds32.c: Likewise. * elf64-hppa.c: Likewise. * elfxx-mips.c: Likewise. * pef.c: Likewise. * pei-x86_64.c: Likewise. * som.c: Likewise. * xsym.c: Likewise. binutils * dlltool.c: Replace use of alloca with call to xmalloc. * dllwrap.c: Likewise. * nlmconv.c: Likewise. * objdump.c: Likewise. * resrc.c: Likewise. * winduni.c: Likewise. * configure: Regenerate. gas * atof-generic.c: Replace use of alloca with call to xmalloc. * cgen.c: Likewise. * dwarf2dbg.c: Likewise. * macro.c: Likewise. * remap.c: Likewise. * stabs.c: Likewise. * symbols.c: Likewise. * config/obj-elf.c: Likewise. * config/tc-aarch64.c: Likewise. * config/tc-arc.c: Likewise. * config/tc-arm.c: Likewise. * config/tc-avr.c: Likewise. * config/tc-ia64.c: Likewise. * config/tc-mips.c: Likewise. * config/tc-msp430.c: Likewise. * config/tc-nds32.c: Likewise. * config/tc-ppc.c: Likewise. * config/tc-sh.c: Likewise. * config/tc-tic30.c: Likewise. * config/tc-tic54x.c: Likewise. * config/tc-xstormy16.c: Likewise. * config/te-vms.c: Likewise. * configure: Regenerate. ld * emultempl/msp430.em: Replace use of alloca with call to xmalloc. * plugin.c: Likewise. * pe-dll.c: Likewise. --- opcodes/cgen-opc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'opcodes/cgen-opc.c') diff --git a/opcodes/cgen-opc.c b/opcodes/cgen-opc.c index d637c7c3041..543ce32397b 100644 --- a/opcodes/cgen-opc.c +++ b/opcodes/cgen-opc.c @@ -460,9 +460,10 @@ cgen_lookup_insn (CGEN_CPU_DESC cd, if (cd->int_insn_p) { info = NULL; - buf = (unsigned char *) alloca (cd->max_insn_bitsize / 8); + buf = (unsigned char *) xmalloc (cd->max_insn_bitsize / 8); cgen_put_insn_value (cd, buf, length, insn_int_value); base_insn = insn_int_value; + free (buf); } else { -- cgit v1.2.1