[PATCH] Fix access to uninitialized variable in fill_in_stop_func
Tom Tromey
tom@tromey.com
Thu Aug 8 17:14:00 GMT 2019
>>>>> "Pedro" == Pedro Franco de Carvalho <pedromfc@linux.ibm.com> writes:
Pedro> This patch changes fill_in_stop_func to check the return value of
Pedro> find_pc_partial_function before accessing the block pointer that is only
Pedro> written by find_pc_partial_function if it returns a success status.
Pedro> gdb/ChangeLog:
Pedro> YYYY-MM-DD Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
Pedro> * infrun.c (fill_in_stop_func): Use return value of
Pedro> find_pc_partial_function, remove comment.
The comment for find_pc_partial_function says:
nullptr is used as a return value for *BLOCK if no block is found.
... which implies to me that the function was intended to set *BLOCK
unconditionally. Perhaps Kevin could say, as I think he added the block
parameter.
Tom
More information about the Gdb-patches
mailing list