Fix PAL_VirtualUnwind Behavior with Clutters in PC
authorMyungJoo Ham <myungjoo.ham@samsung.com>
Wed, 2 Mar 2016 12:27:00 +0000 (21:27 +0900)
committerMyungJoo Ham <myungjoo.ham@samsung.com>
Fri, 4 Mar 2016 05:28:35 +0000 (14:28 +0900)
commitb15c9d4f8a2bdad6dc7ecc03df037783e31d7d0c
tree74ca902157851a30265e137c55ec72a9a71ddade
parent3c0d5e85c59107a4710317f445bec0528cbe232b
Fix PAL_VirtualUnwind Behavior with Clutters in PC

Libunwind-ARM recommends to read LR to get value of PC
while unwinding stack, which often causes the caller
(PAL_VirtualUnwind) to have LSB of PC set.

Such behavior incurs errornous behavior of PAL_VirtualUnwind
if the output is fed back to PAL_VirtualUnwind as the input,
which is observed with VirtualUnwindToFirstManagedCallFrame().

This commit clears LSB of PC in WinContext to prevent it.

Note that this is a partial fix for the issue #3462.
(this does not fix assembly stacks)

Fix #3462

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
src/pal/src/exception/seh-unwind.cpp