This is the mail archive of the gdb-patches@sourceware.cygnus.com mailing list for the GDB project.


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

Re: PATCH/RFA free(NULL) bomb in printcmd.c


Andrew Cagney wrote :
> The attached appears to work much better. The function wasn't cleaning
> up when build_address_symbolic failed.  This led to a later cleanup call
> freeing a garbage pointer on the stack.
> 
> Philippe, can you try it on your platform.
> 
> 	Andrew

> Thu Apr 20 17:39:11 2000  Andrew Cagney  <cagney@b1.cygnus.com>
> 
> 	* defs.h, utils.c (free_current_contents): Change parameter to
>  	void*.
> 
> 	From Philippe De Muyter  <phdm@macqel.be>:
> 	* printcmd.c (print_address_symbolic): Call `make_cleanup' with
> 	`(free_current_contents, &x)', not `(free, x)'.
> 	* utils.c (free_current_contents): Do not `free (NULL)'.
> 
> 	* printcmd.c (print_address_symbolic): Cleanup after a failed
> 	call to build_address_symbolic.
> 

I've tested it, and it's fine.  Thanks.

Philippe

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