During the 'thread step-out' command, check that the memory we are about to place a breakpoint in is executable. Previously, if the current function had a nonstandard stack layout/ABI, and had a valid data pointer in the location where the return address is usually located, data corruption would occur when the breakpoint was written. This could lead to an incorrectly reported crash or silent corruption of the program's state. Now, if the above check fails, the command safely aborts.
Further discussion:
This patch doesn't include a unit test -- I'd be happy to add one, but would appreciate guidance on how to do so. This is my first time working with the lldb codebase.I wasn't sure if it was necessary to first check the log pointer before using it. Some parts of the code do this, and some don't.Should we print out the return address in the log line?
Also, I don't have commit access, so I will need some help landing it when it's ready.