[llvm-bugs] [Bug 43701] New: llvm do not generate __emutls_v.xx symbol for TLS variable alias

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Oct 17 05:59:08 PDT 2019


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

            Bug ID: 43701
           Summary: llvm do not generate __emutls_v.xx symbol for TLS
                    variable alias
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Common Code Generator Code
          Assignee: unassignedbugs at nondot.org
          Reporter: unclepom at sina.com
                CC: llvm-bugs at lists.llvm.org

Created attachment 22686
  --> https://bugs.llvm.org/attachment.cgi?id=22686&action=edit
source and build command and a patch to fix this bug

0.      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 
1.      <eof> parser at end of file
2.      Code generation
3.      Running pass 'Function Pass Manager' on module 'test.c'.
4.      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_delete<llvm::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

-- 
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/20191017/43028631/attachment-0001.html>


More information about the llvm-bugs mailing list