[llvm-bugs] [Bug 27062] New: OSX thread_local: Bad machine code: Using an undefined physical register
via llvm-bugs
llvm-bugs at lists.llvm.org
Thu Mar 24 14:35:06 PDT 2016
https://llvm.org/bugs/show_bug.cgi?id=27062
Bug ID: 27062
Summary: OSX thread_local: Bad machine code: Using an undefined
physical register
Product: clang
Version: trunk
Hardware: PC
OS: MacOS X
Status: NEW
Severity: normal
Priority: P
Component: -New Bugs
Assignee: unassignedclangbugs at nondot.org
Reporter: aizatsky at chromium.org
CC: llvm-bugs at lists.llvm.org
Classification: Unclassified
On r264341
$ cat ./FuzzerTraceState-40081e.cpp
thread_local bool TraceStateIsMyThread;
$ clang++ -cc1 -triple x86_64-apple-macosx10.7.0 -emit-obj -std=c++11
-stack-protector 3 -O2 FuzzerTraceState-40081e.cpp
# Machine code for function _ZTW20TraceStateIsMyThread: Post SSA
Frame Objects:
fi#0: size=8, align=8, at location [SP+8]
BB#0: derived from LLVM BB %0
Live Ins: %RBX %R12 %R13 %R14 %R15 %RCX %RDX %RSI %R8 %R9 %R10 %R11
%vreg0<def> = LOAD_STACK_GUARD; mem:LD8[@__stack_chk_guard](invariant)
GR64:%vreg0
MOV64mr <fi#0>, 1, %noreg, 0, %noreg, %vreg0; mem:Volatile
ST8[FixedStack0] GR64:%vreg0
ADJCALLSTACKDOWN64 0, 0, %RSP<imp-def,dead>, %EFLAGS<imp-def,dead>,
%RSP<imp-use>
%RDI<def> = MOV64rm %RIP, 0, %noreg, <ga:@TraceStateIsMyThread>[TF=21],
%noreg
CALL64m %RDI<kill>, 1, %noreg, 0, %noreg, <regmask %BH %BL %BP %BPL %BX
%CH %CL %CX %DH %DL %DX %EBP %EBX %ECX %EDX %ESI %RBP %RBX %RCX %RDX %RSI %SI
%SIL %R8 %R9 %R10 %R11 %R12 %R13 %R14 %R15 %R8B %R9B
%R10B %R11B %R12B %R13B %R14B %R15B %R8D %R9D %R10D %R11D %R12D %R13D %R14D
%R15D %R8W %R9W %R10W %R11W %R12W %R13W %R14W %R15W>, %RSP<imp-use>,
%RAX<imp-def>
ADJCALLSTACKUP64 0, 0, %RSP<imp-def,dead>, %EFLAGS<imp-def,dead>,
%RSP<imp-use>
%vreg1<def> = COPY %RAX<kill>; GR64:%vreg1
CMP64rm %vreg0, <fi#0>, 1, %noreg, 0, %noreg, %EFLAGS<imp-def>;
mem:Volatile LD8[FixedStack0] GR64:%vreg0
JNE_1 <BB#1>, %EFLAGS<imp-use,kill>
JMP_1 <BB#2>
Successors according to CFG: BB#2(0x7ffff800 / 0x80000000 = 100.00%)
BB#1(0x00000800 / 0x80000000 = 0.00%)
BB#1: derived from LLVM BB %0
Predecessors according to CFG: BB#0
ADJCALLSTACKDOWN64 0, 0, %RSP<imp-def,dead>, %EFLAGS<imp-def,dead>,
%RSP<imp-use>
CALL64pcrel32 <es:__stack_chk_fail>, <regmask %BH %BL %BP %BPL %BX %EBP
%EBX %RBP %RBX %R12 %R13 %R14 %R15 %R12B %R13B %R14B %R15B %R12D %R13D %R14D
%R15D %R12W %R13W %R14W %R15W>, %RSP<imp-use>, %RSP<i
mp-def>
ADJCALLSTACKUP64 0, 0, %RSP<imp-def,dead>, %EFLAGS<imp-def,dead>,
%RSP<imp-use>
BB#2: derived from LLVM BB %0
Predecessors according to CFG: BB#0
%RAX<def> = COPY %vreg1; GR64:%vreg1
RET 0, %RAX<kill>, %RBX, %R12<kill>, %R13<kill>, %R14<kill>,
%R15<kill>, %RCX<kill>, %RDX<kill>, %RSI<kill>, %R8<kill>, %R9<kill>,
%R10<kill>, %R11<kill>
# End machine code for function _ZTW20TraceStateIsMyThread.
*** Bad machine code: Using an undefined physical register ***
- function: _ZTW20TraceStateIsMyThread
- basic block: BB#2 (0x68725b0)
- instruction: RET
- operand 2: %RBX
*** Bad machine code: Using an undefined physical register ***
- function: _ZTW20TraceStateIsMyThread
- basic block: BB#2 (0x68725b0)
- instruction: RET
- operand 3: %R12<kill>
*** Bad machine code: Using an undefined physical register ***
- function: _ZTW20TraceStateIsMyThread
- basic block: BB#2 (0x68725b0)
- instruction: RET
- operand 4: %R13<kill>
*** Bad machine code: Using an undefined physical register ***
- function: _ZTW20TraceStateIsMyThread
- basic block: BB#2 (0x68725b0)
- instruction: RET
- operand 5: %R14<kill>
*** Bad machine code: Using an undefined physical register ***
- function: _ZTW20TraceStateIsMyThread
- basic block: BB#2 (0x68725b0)
- instruction: RET
- operand 6: %R15<kill>
*** Bad machine code: Using an undefined physical register ***
- function: _ZTW20TraceStateIsMyThread
- basic block: BB#2 (0x68725b0)
- instruction: RET
- operand 7: %RCX<kill>
*** Bad machine code: Using an undefined physical register ***
- function: _ZTW20TraceStateIsMyThread
- basic block: BB#2 (0x68725b0)
- instruction: RET
- operand 8: %RDX<kill>
*** Bad machine code: Using an undefined physical register ***
- function: _ZTW20TraceStateIsMyThread
- basic block: BB#2 (0x68725b0)
- instruction: RET
- operand 9: %RSI<kill>
*** Bad machine code: Using an undefined physical register ***
- function: _ZTW20TraceStateIsMyThread
- basic block: BB#2 (0x68725b0)
- instruction: RET
- operand 10: %R8<kill>
*** Bad machine code: Using an undefined physical register ***
- function: _ZTW20TraceStateIsMyThread
- basic block: BB#2 (0x68725b0)
- instruction: RET
- operand 11: %R9<kill>
*** Bad machine code: Using an undefined physical register ***
- function: _ZTW20TraceStateIsMyThread
- basic block: BB#2 (0x68725b0)
- instruction: RET
- operand 12: %R10<kill>
*** Bad machine code: Using an undefined physical register ***
- function: _ZTW20TraceStateIsMyThread
- basic block: BB#2 (0x68725b0)
- instruction: RET
- operand 13: %R11<kill>
fatal error: error in backend: Found 12 machine code errors.
--
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/20160324/f9e8966e/attachment-0001.html>
More information about the llvm-bugs
mailing list