Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[llvm-debuginfo-analyzer] Invalid logical view with (--print=sizes) on 'arm' and '32-bit multilib on amd64' #58758

Closed
CarlosAlbertoEnciso opened this issue Nov 2, 2022 · 2 comments

Comments

@CarlosAlbertoEnciso
Copy link
Member

The 08-elf-reader patch for llvm-debuginfo-analyzer landed in:
https://reviews.llvm.org/rG4f06d46f465c8239ed0863abdd78f7ee1fbb42b4
https://reviews.llvm.org/D125783#3898878

The test case:
https://github.com/llvm/llvm-project/blob/main/llvm/test/tools/llvm-debuginfo-analyzer/DWARF/06-dwarf-full-logical-view.test
produces an invalid ouput as reported in:

clang-armv7-vfpv3-2stage
https://lab.llvm.org/buildbot/#/builders/182/builds/4232

clang-armv7-global-isel
https://lab.llvm.org/buildbot/#/builders/186/builds/9519

clang-armv7-2stage
https://lab.llvm.org/buildbot/#/builders/187/builds/9483

Expected:

 189 (100.00%) : [0x000000000b][001]    {CompileUnit}
 110 ( 58.20%) : [0x000000002a][002] 2    {Function}
  27 ( 14.29%) : [0x0000000071][003]        {Block}

Generated:

3432 (  0.00%) : [0x000000000b][001]    {CompileUnit}
3351 (  0.00%) : [0x000000002a][002] 2    {Function}
3234 (  0.00%) : [0x0000000071][003]        {Block}

The same problem reported building 32-bit multilib on amd64

! In D125783#3894727, @mgorny wrote:
This is also broken on i386 (so perhaps on all 32-bit platforms?):
Generated:

 189 (  0.00%) : [0x000000000b][001]              {CompileUnit} 'test.cpp' 
 110 ( -0.00%) : [0x000000002a][002]      2         {Function} extern not_inlined 'foo' -> [0x0000000099]'int' 
   27 (-26815615859885194199148049996411692254958731641184786755447122887443528060147093953603748596333806855380063716372972101707507765623893139892867298012168192.00%) : [0x0000000071][003]                  {Block} 
@CarlosAlbertoEnciso CarlosAlbertoEnciso added llvm-tools All llvm tools that do not have corresponding tag debuginfo labels Nov 2, 2022
@llvmbot
Copy link
Collaborator

llvmbot commented Nov 2, 2022

@llvm/issue-subscribers-debuginfo

@CarlosAlbertoEnciso
Copy link
Member Author

From @mgorny:

But I can also reproduce in my working copy that's configured as:

CC=i686-pc-linux-gnu-gcc CXX=i686-pc-linux-gnu-g++ cmake ../llvm -G Ninja -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=MinSizeRel -DLLVM_TARGETS_TO_BUILD=X86 -DCLANG_ENABLE_ARCMT=OFF -DLLVM_ENABLE_ASSERTIONS=ON -DLLVM_CCACHE_BUILD=ON -DLLVM_ENABLE_PROJECTS='llvm' -DLLVM_BUILD_TESTS=OFF -DLLVM_HOST_TRIPLE=i686-pc-linux-gnu

where i686-pc-linux-gnu-* wrappers simply call the respective GCC executables with -m32

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants