Fix null pointer dereference in RegsArm.
Fix RegsArm::GetPcAdjustment to check for an invalid elf before trying to read memory. Modify the tests for this so it crashes without this change. Also modify the GetPcAdjustment for all different architectures so that unless the relative pc is too small, it will return the minimum amount that should be adjusted. This is to handle cases where we still want to adjust the pc but it's in an invalid elf. Mostly this is for handling cases when the pc is in jit gdb debug code so that we use the right unwind information. Bug: 77233204 Test: Passes unit tests for libbacktrace/libunwindstack. Change-Id: Id73609adaf3b80a583584441de228156fec3afa7
Loading
Please register or sign in to comment