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 do not generate __emutls_v.xx symbol for TLS variable alias #43046

Open
llvmbot opened this issue Oct 17, 2019 · 0 comments
Open

llvm do not generate __emutls_v.xx symbol for TLS variable alias #43046

llvmbot opened this issue Oct 17, 2019 · 0 comments
Labels
bugzilla Issues migrated from bugzilla llvm:codegen

Comments

@llvmbot
Copy link
Member

llvmbot commented Oct 17, 2019

Bugzilla Link 43701
Version trunk
OS Linux
Attachments source and build command and a patch to fix this bug
Reporter LLVM Bugzilla Contributor

Extended Description

  1. Program arguments: /usr/lib/llvm-7/bin/clang -cc1 -triple x86_64-pc-linux-gnu -emit-obj -mrelax-all -disable-free -disable-llvm-verifier -discard-value-names -main-file-name test.c -mrelocation-model static -mthread-model posix -mdisable-fp-elim -fmath-errno -masm-verbose -mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu x86-64 -dwarf-column-info -debugger-tuning=gdb -coverage-notes-file /home/xxx/path/test.gcno -resource-dir /usr/lib/llvm-7/lib/clang/7.0.1 -D INCLUDE_SOURCE -internal-isystem /usr/local/include -internal-isystem /usr/lib/llvm-7/lib/clang/7.0.1/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -fdebug-compilation-dir /home/xxx/path -ferror-limit 19 -fmessage-length 321 -femulated-tls -fobjc-runtime=gcc -fdiagnostics-show-option -fcolor-diagnostics -o test.o -x c test.c -faddrsig
  2. parser at end of file
  3. Code generation
  4. Running pass 'Function Pass Manager' on module 'test.c'.
  5. Running pass 'X86 DAG->DAG Instruction Selection' on function '@getnewname'
    #​0 0x00007f9e1fc3fc2f llvm::sys::PrintStackTrace(llvm::raw_ostream&) (/lib/x86_64-linux-gnu/libLLVM-7.so.1+0x9cec2f)
    #​1 0x00007f9e1fc3e160 llvm::sys::RunSignalHandlers() (/lib/x86_64-linux-gnu/libLLVM-7.so.1+0x9cd160)
    #​2 0x00007f9e1fc3ff42 (/lib/x86_64-linux-gnu/libLLVM-7.so.1+0x9cef42)
    #​3 0x00007f9e22c98730 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x12730)
    #​4 0x00007f9e2016dfe4 llvm::SelectionDAG::getGlobalAddress(llvm::GlobalValue const*, llvm::SDLoc const&, llvm::EVT, long, bool, unsigned char) (/lib/x86_64-linux-gnu/libLLVM-7.so.1+0xefcfe4)
    #​5 0x00007f9e201d079a llvm::TargetLowering::LowerToTLSEmulatedModel(llvm::GlobalAddressSDNode const*, llvm::SelectionDAG&) const (/lib/x86_64-linux-gnu/libLLVM-7.so.1+0xf5f79a)
    #​6 0x00007f9e21512524 llvm::X86TargetLowering::LowerGlobalTLSAddress(llvm::SDValue, llvm::SelectionDAG&) const (/lib/x86_64-linux-gnu/libLLVM-7.so.1+0x22a1524)
    #​7 0x00007f9e2152e5e7 llvm::X86TargetLowering::LowerOperation(llvm::SDValue, llvm::SelectionDAG&) const (/lib/x86_64-linux-gnu/libLLVM-7.so.1+0x22bd5e7)
    #​8 0x00007f9e20092bb4 (/lib/x86_64-linux-gnu/libLLVM-7.so.1+0xe21bb4)
    #​9 0x00007f9e200921d0 llvm::SelectionDAG::Legalize() (/lib/x86_64-linux-gnu/libLLVM-7.so.1+0xe211d0)
    #​10 0x00007f9e201a0816 llvm::SelectionDAGISel::CodeGenAndEmitDAG() (/lib/x86_64-linux-gnu/libLLVM-7.so.1+0xf2f816)
    #​11 0x00007f9e2019f62e llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&) (/lib/x86_64-linux-gnu/libLLVM-7.so.1+0xf2e62e)
    #​12 0x00007f9e2019c966 llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) (/lib/x86_64-linux-gnu/libLLVM-7.so.1+0xf2b966)
    #​13 0x00007f9e214e43c1 (/lib/x86_64-linux-gnu/libLLVM-7.so.1+0x22733c1)
    #​14 0x00007f9e1fe9fdf9 llvm::MachineFunctionPass::runOnFunction(llvm::Function&) (/lib/x86_64-linux-gnu/libLLVM-7.so.1+0xc2edf9)
    #​15 0x00007f9e1fd30668 llvm::FPPassManager::runOnFunction(llvm::Function&) (/lib/x86_64-linux-gnu/libLLVM-7.so.1+0xabf668)
    #​16 0x00007f9e1fd308c3 llvm::FPPassManager::runOnModule(llvm::Module&) (/lib/x86_64-linux-gnu/libLLVM-7.so.1+0xabf8c3)
    #​17 0x00007f9e1fd30c8b llvm::legacy::PassManagerImpl::run(llvm::Module&) (/lib/x86_64-linux-gnu/libLLVM-7.so.1+0xabfc8b)
    #​18 0x00000000006f21e5 clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions const&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::DataLayout const&, llvm::Module*, clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_deletellvm::raw_pwrite_stream >) (/usr/lib/llvm-7/bin/clang+0x6f21e5)
    #​19 0x0000000000c344a5 (/usr/lib/llvm-7/bin/clang+0xc344a5)
    #​20 0x00000000010b8415 clang::ParseAST(clang::Sema&, bool, bool) (/usr/lib/llvm-7/bin/clang+0x10b8415)
    #​21 0x0000000000ad243f clang::FrontendAction::Execute() (/usr/lib/llvm-7/bin/clang+0xad243f)
    #​22 0x0000000000a93738 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/usr/lib/llvm-7/bin/clang+0xa93738)
    #​23 0x0000000000b608d6 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/usr/lib/llvm-7/bin/clang+0xb608d6)
    #​24 0x00000000006aa014 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/usr/lib/llvm-7/bin/clang+0x6aa014)
    #​25 0x00000000006a84b7 main (/usr/lib/llvm-7/bin/clang+0x6a84b7)
    #​26 0x00007f9e1edb309b __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2409b)
    #​27 0x00000000006a5ada _start (/usr/lib/llvm-7/bin/clang+0x6a5ada)
    clang: error: unable to execute command: Segmentation fault
    clang: error: clang frontend command failed due to signal (use -v to see invocation)
    clang version 7.0.1-8 (tags/RELEASE_701/final)
    Target: x86_64-pc-linux-gnu
    Thread model: posix
    InstalledDir: /usr/bin
@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugzilla Issues migrated from bugzilla llvm:codegen
Projects
None yet
Development

No branches or pull requests

1 participant