This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA] Replace strdup with xstrdup in tic30-dis.c


On Mon, Nov 18, 2002 at 05:16:06PM -0500, Klee Dienes wrote:

        * tic30-dis.c (print_par_insn): Use xstrdup instead of strdup.
Alan, to clarify something here.

I know BFD intentionally doesn't use the x*() functions. Instead it tries to clean up and return an error indication when there is a malloc() failure.

What of the disassembler though? GDB, which is depending on the disassembler, needs to be able to recover from low memory (aka malloc() failure) conditions. Is using xstrdup() in the disassembler going to lead to memory leaks in the case where xmalloc() fails?

Andrew



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]