PATCH/RFA free(NULL) bomb in printcmd.c
Philippe De Muyter
phdm@macqel.be
Sun Apr 23 21:39:00 GMT 2000
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
More information about the Gdb-patches
mailing list