Use correct pointer size for stack unwinding.

This fixes a failed DCHECK_ALIGNED followed by a SIGSEGV when
building the 32-bit framework boot image extension with jacoco
instrumentation (the coverage build). The crash did not occur
for 64-bit image because kRuntimePointerSize was 64 in both cases,
which happened to be correct for 64-bit image, but not 32-bit one.

The failed alignment check was caused by assuming incorrect
pointer size in StackWalk when handling exception in dex2oatd.

The crash can only be reproduced under the following conditions:
  - boot image extension is used for the framework image
  - this is a coverage build ( EMMA_INSTRUMENT_FRAMEWORK=true)
  - jacocoagent is added to the primary boot image

The fix does not resolve the boot problem (under the above conditions
the phone still fails boot due to other errors). The fix only removes
the build-time crash on 32-bit framework boot image extension.

Test: Manually sync the repos to the state of art that includes
    boot image extension change (assuming AOSP):
    I5e417cd2588ae7b88e7b6abf7ae54268d2cce5f8, then:

    $ lunch aosp_walleye-userdebug
    $ build/soong/soong_ui.bash \
        --make-mode \
        SKIP_ABI_CHECKS=true \
        TARGET_PRODUCT=aosp_walleye \
        TARGET_BUILD_VARIANT=userdebug \
        EMMA_INSTRUMENT=true \
        EMMA_INSTRUMENT_FRAMEWORK=true \
        NATIVE_COVERAGE=true \
        SKIP_BOOT_JARS_CHECK=true \
        droid

    Maybe not all the variables are needed, I used the build command
    from the failed coverage build.

    Before the patch, the build would fail with a dex2oat crash on
    out/soong/walleye/dex_bootjars/system/framework/arm/boot.art
    target. After the patch, the build finishes successfully.

Bug: 145749668

Change-Id: Ic3f5459d20b9b30534d60aa2e96a440209b08c50
1 file changed