diff options
author | Bruno Larsen <blarsen@redhat.com> | 2022-02-22 11:44:44 -0300 |
---|---|---|
committer | Bruno Larsen <blarsen@redhat.com> | 2022-03-21 09:08:55 -0300 |
commit | daaf7acf47a12d10459060dca5500b63273cd683 (patch) | |
tree | 2588c3b660987ba49b11cc62674594ab73b0a81b /gdb/python | |
parent | 9170b70c41064a0ba197dc7e2d6ecb940d2272bb (diff) | |
download | binutils-daaf7acf47a12d10459060dca5500b63273cd683.zip binutils-daaf7acf47a12d10459060dca5500b63273cd683.tar.gz binutils-daaf7acf47a12d10459060dca5500b63273cd683.tar.bz2 |
[gdb/testsuite] test a function call by hand from pretty printer
The test case added here is testing the bug gdb/28856, where calling a
function by hand from a pretty printer makes GDB crash. There are 6
mechanisms to trigger this crash in the current test, using the commands
backtrace, up, down, finish, step and continue. Since the failure happens
because of use-after-free (more details below) the tests will always
have a chance of passing through sheer luck, but anecdotally they seem
to fail all of the time.
The reason GDB is crashing is a use-after-free problem. The above
mentioned functions save a pointer to the current frame's information,
then calls the pretty printer, and uses the saved pointer for different
reasons, depending on the function. The issue happens because
call_function_by_hand needs to reset the obstack to get the current
frame, invalidating the saved pointer.
Diffstat (limited to 'gdb/python')
0 files changed, 0 insertions, 0 deletions