[llvm-bugs] [Bug 47171] New: Unwind information is not emitted for ThumbV7PILongThunks

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Aug 14 12:10:14 PDT 2020


https://bugs.llvm.org/show_bug.cgi?id=47171

            Bug ID: 47171
           Summary: Unwind information is not emitted for
                    ThumbV7PILongThunks
           Product: new-bugs
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: wittman at chromium.org
                CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org

The .debug_frame section of a .so for Android arm32 contains no FDEs covering
ThumbV7PILongThunks. This is particularly problematic for Chromium where the
.text section of libchrome.so is 80MB and contains 42k thunks, and a
non-trivial amount of execution time is spent in the thunks.

This was observed in Chromium's clang built from
1bd7046e4ce0102adef6096a12a289d7f94b8c73.

It's not clear that a reduced repro is possible since thunks are only needed on
arm32 when the text section is >32MB. To reproduce with Chromium:

1. Follow
https://chromium.googlesource.com/chromium/src/+/master/docs/android_build_instructions.md
has instruction to set up a Chromium build for Android, but use the following
file contents for the 'gn args out/Default' step:

target_os = "android"
target_cpu = "arm"
is_component_build = false

2. After building chrome_public_apk the relevant .so is in
out/Default/lib.unstripped/libchrome.so.

3. Find the address of an example thunk:
third_party/android_ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/arm-linux-androideabi/bin/objdump
-j .text -dC out/Default/lib.unstripped/libchrome.so | perl -lne 'print if
/^.{8} <__ARMV7PILongThunk___cxa_finalize>/../^$/'

4. Observe that no FDEs cover the address of the example thunk in the output of
llvm-dwarfdump --debug-frame out/Debug/lib.unstripped/libchrome.so

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20200814/9201489e/attachment.html>


More information about the llvm-bugs mailing list