Linux vmi284606.contaboserver.net 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64
Apache/2.4.57 (Ubuntu)
: 167.86.127.34 | : 216.73.217.31
Cant Read [ /etc/named.conf ]
7.2.24-0ubuntu0.18.04.17
root
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
README
+ Create Folder
+ Create File
/
usr /
local /
go /
src /
cmd /
compile /
internal /
ssa /
[ HOME SHELL ]
Name
Size
Permission
Action
gen
[ DIR ]
drwxr-xr-x
testdata
[ DIR ]
drwxr-xr-x
README.md
7.76
KB
-rw-r--r--
TODO
950
B
-rw-r--r--
biasedsparsemap.go
2.71
KB
-rw-r--r--
block.go
8.64
KB
-rw-r--r--
branchelim.go
11.41
KB
-rw-r--r--
branchelim_test.go
5.21
KB
-rw-r--r--
cache.go
2.46
KB
-rw-r--r--
check.go
13.9
KB
-rw-r--r--
checkbce.go
956
B
-rw-r--r--
compile.go
16.22
KB
-rw-r--r--
config.go
11.39
KB
-rw-r--r--
copyelim.go
1.82
KB
-rw-r--r--
copyelim_test.go
1.29
KB
-rw-r--r--
critical.go
3.15
KB
-rw-r--r--
cse.go
10.62
KB
-rw-r--r--
cse_test.go
4.21
KB
-rw-r--r--
deadcode.go
9.73
KB
-rw-r--r--
deadcode_test.go
3.49
KB
-rw-r--r--
deadstore.go
8.98
KB
-rw-r--r--
deadstore_test.go
4.09
KB
-rw-r--r--
debug.go
33.92
KB
-rw-r--r--
debug_test.go
28.68
KB
-rw-r--r--
decompose.go
10.91
KB
-rw-r--r--
dom.go
7.98
KB
-rw-r--r--
dom_test.go
13.34
KB
-rw-r--r--
export_test.go
5.68
KB
-rw-r--r--
flagalloc.go
5.49
KB
-rw-r--r--
func.go
22.17
KB
-rw-r--r--
func_test.go
12.85
KB
-rw-r--r--
fuse.go
5.7
KB
-rw-r--r--
fuse_test.go
5.04
KB
-rw-r--r--
html.go
29.04
KB
-rw-r--r--
id.go
576
B
-rw-r--r--
layout.go
3.56
KB
-rw-r--r--
lca.go
3.71
KB
-rw-r--r--
lca_test.go
1.65
KB
-rw-r--r--
likelyadjust.go
15.23
KB
-rw-r--r--
location.go
2.8
KB
-rw-r--r--
loopbce.go
9.85
KB
-rw-r--r--
loopreschedchecks.go
15.36
KB
-rw-r--r--
looprotate.go
2.24
KB
-rw-r--r--
lower.go
1.24
KB
-rw-r--r--
magic.go
13.42
KB
-rw-r--r--
magic_test.go
9.1
KB
-rw-r--r--
nilcheck.go
11.11
KB
-rw-r--r--
nilcheck_test.go
12.07
KB
-rw-r--r--
numberlines.go
8.44
KB
-rw-r--r--
op.go
8.74
KB
-rw-r--r--
opGen.go
839.32
KB
-rw-r--r--
opt.go
290
B
-rw-r--r--
passbm_test.go
3.14
KB
-rw-r--r--
phielim.go
1.47
KB
-rw-r--r--
phiopt.go
3.96
KB
-rw-r--r--
poset.go
37.23
KB
-rw-r--r--
poset_test.go
18.14
KB
-rw-r--r--
print.go
2.98
KB
-rw-r--r--
prove.go
36.68
KB
-rw-r--r--
redblack32.go
8.9
KB
-rw-r--r--
redblack32_test.go
5.96
KB
-rw-r--r--
regalloc.go
76.36
KB
-rw-r--r--
regalloc_test.go
6.41
KB
-rw-r--r--
rewrite.go
33.06
KB
-rw-r--r--
rewrite386.go
514.14
KB
-rw-r--r--
rewrite386splitload.go
3.7
KB
-rw-r--r--
rewriteAMD64.go
1.31
MB
-rw-r--r--
rewriteAMD64splitload.go
4.95
KB
-rw-r--r--
rewriteARM.go
538.26
KB
-rw-r--r--
rewriteARM64.go
837.68
KB
-rw-r--r--
rewriteMIPS.go
203.31
KB
-rw-r--r--
rewriteMIPS64.go
227.84
KB
-rw-r--r--
rewritePPC64.go
661.88
KB
-rw-r--r--
rewriteRISCV64.go
123.11
KB
-rw-r--r--
rewriteS390X.go
904.36
KB
-rw-r--r--
rewriteWasm.go
136.86
KB
-rw-r--r--
rewrite_test.go
3.01
KB
-rw-r--r--
rewritedec.go
10.56
KB
-rw-r--r--
rewritedec64.go
64.01
KB
-rw-r--r--
rewritedecArgs.go
6.6
KB
-rw-r--r--
rewritegeneric.go
1.09
MB
-rw-r--r--
schedule.go
13.99
KB
-rw-r--r--
schedule_test.go
2.91
KB
-rw-r--r--
shift_test.go
4.05
KB
-rw-r--r--
shortcircuit.go
3.97
KB
-rw-r--r--
shortcircuit_test.go
1.31
KB
-rw-r--r--
sizeof_test.go
855
B
-rw-r--r--
softfloat.go
1.94
KB
-rw-r--r--
sparsemap.go
1.98
KB
-rw-r--r--
sparseset.go
1.54
KB
-rw-r--r--
sparsetree.go
7.88
KB
-rw-r--r--
sparsetreemap.go
7.67
KB
-rw-r--r--
stackalloc.go
10.95
KB
-rw-r--r--
stackframe.go
290
B
-rw-r--r--
stmtlines_test.go
2.75
KB
-rw-r--r--
tighten.go
4.21
KB
-rw-r--r--
trim.go
4.24
KB
-rw-r--r--
value.go
10.71
KB
-rw-r--r--
writebarrier.go
17.92
KB
-rw-r--r--
writebarrier_test.go
1.75
KB
-rw-r--r--
xposmap.go
3.29
KB
-rw-r--r--
zcse.go
2.12
KB
-rw-r--r--
zeroextension_test.go
1.66
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : check.go
// Copyright 2015 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package ssa import ( "math" "math/bits" ) // checkFunc checks invariants of f. func checkFunc(f *Func) { blockMark := make([]bool, f.NumBlocks()) valueMark := make([]bool, f.NumValues()) for _, b := range f.Blocks { if blockMark[b.ID] { f.Fatalf("block %s appears twice in %s!", b, f.Name) } blockMark[b.ID] = true if b.Func != f { f.Fatalf("%s.Func=%s, want %s", b, b.Func.Name, f.Name) } for i, e := range b.Preds { if se := e.b.Succs[e.i]; se.b != b || se.i != i { f.Fatalf("block pred/succ not crosslinked correctly %d:%s %d:%s", i, b, se.i, se.b) } } for i, e := range b.Succs { if pe := e.b.Preds[e.i]; pe.b != b || pe.i != i { f.Fatalf("block succ/pred not crosslinked correctly %d:%s %d:%s", i, b, pe.i, pe.b) } } switch b.Kind { case BlockExit: if len(b.Succs) != 0 { f.Fatalf("exit block %s has successors", b) } if b.NumControls() != 1 { f.Fatalf("exit block %s has no control value", b) } if !b.Controls[0].Type.IsMemory() { f.Fatalf("exit block %s has non-memory control value %s", b, b.Controls[0].LongString()) } case BlockRet: if len(b.Succs) != 0 { f.Fatalf("ret block %s has successors", b) } if b.NumControls() != 1 { f.Fatalf("ret block %s has nil control", b) } if !b.Controls[0].Type.IsMemory() { f.Fatalf("ret block %s has non-memory control value %s", b, b.Controls[0].LongString()) } case BlockRetJmp: if len(b.Succs) != 0 { f.Fatalf("retjmp block %s len(Succs)==%d, want 0", b, len(b.Succs)) } if b.NumControls() != 1 { f.Fatalf("retjmp block %s has nil control", b) } if !b.Controls[0].Type.IsMemory() { f.Fatalf("retjmp block %s has non-memory control value %s", b, b.Controls[0].LongString()) } if b.Aux == nil { f.Fatalf("retjmp block %s has nil Aux field", b) } case BlockPlain: if len(b.Succs) != 1 { f.Fatalf("plain block %s len(Succs)==%d, want 1", b, len(b.Succs)) } if b.NumControls() != 0 { f.Fatalf("plain block %s has non-nil control %s", b, b.Controls[0].LongString()) } case BlockIf: if len(b.Succs) != 2 { f.Fatalf("if block %s len(Succs)==%d, want 2", b, len(b.Succs)) } if b.NumControls() != 1 { f.Fatalf("if block %s has no control value", b) } if !b.Controls[0].Type.IsBoolean() { f.Fatalf("if block %s has non-bool control value %s", b, b.Controls[0].LongString()) } case BlockDefer: if len(b.Succs) != 2 { f.Fatalf("defer block %s len(Succs)==%d, want 2", b, len(b.Succs)) } if b.NumControls() != 1 { f.Fatalf("defer block %s has no control value", b) } if !b.Controls[0].Type.IsMemory() { f.Fatalf("defer block %s has non-memory control value %s", b, b.Controls[0].LongString()) } case BlockFirst: if len(b.Succs) != 2 { f.Fatalf("plain/dead block %s len(Succs)==%d, want 2", b, len(b.Succs)) } if b.NumControls() != 0 { f.Fatalf("plain/dead block %s has a control value", b) } } if len(b.Succs) != 2 && b.Likely != BranchUnknown { f.Fatalf("likeliness prediction %d for block %s with %d successors", b.Likely, b, len(b.Succs)) } for _, v := range b.Values { // Check to make sure argument count makes sense (argLen of -1 indicates // variable length args) nArgs := opcodeTable[v.Op].argLen if nArgs != -1 && int32(len(v.Args)) != nArgs { f.Fatalf("value %s has %d args, expected %d", v.LongString(), len(v.Args), nArgs) } // Check to make sure aux values make sense. canHaveAux := false canHaveAuxInt := false switch opcodeTable[v.Op].auxType { case auxNone: case auxBool: if v.AuxInt < 0 || v.AuxInt > 1 { f.Fatalf("bad bool AuxInt value for %v", v) } canHaveAuxInt = true case auxInt8: if v.AuxInt != int64(int8(v.AuxInt)) { f.Fatalf("bad int8 AuxInt value for %v", v) } canHaveAuxInt = true case auxInt16: if v.AuxInt != int64(int16(v.AuxInt)) { f.Fatalf("bad int16 AuxInt value for %v", v) } canHaveAuxInt = true case auxInt32: if v.AuxInt != int64(int32(v.AuxInt)) { f.Fatalf("bad int32 AuxInt value for %v", v) } canHaveAuxInt = true case auxInt64, auxFloat64: canHaveAuxInt = true case auxInt128: // AuxInt must be zero, so leave canHaveAuxInt set to false. case auxFloat32: canHaveAuxInt = true if !isExactFloat32(v.AuxFloat()) { f.Fatalf("value %v has an AuxInt value that is not an exact float32", v) } case auxString, auxSym, auxTyp, auxArchSpecific: canHaveAux = true case auxSymOff, auxSymValAndOff, auxTypSize: canHaveAuxInt = true canHaveAux = true case auxCCop: if _, ok := v.Aux.(Op); !ok { f.Fatalf("bad type %T for CCop in %v", v.Aux, v) } canHaveAux = true default: f.Fatalf("unknown aux type for %s", v.Op) } if !canHaveAux && v.Aux != nil { f.Fatalf("value %s has an Aux value %v but shouldn't", v.LongString(), v.Aux) } if !canHaveAuxInt && v.AuxInt != 0 { f.Fatalf("value %s has an AuxInt value %d but shouldn't", v.LongString(), v.AuxInt) } for i, arg := range v.Args { if arg == nil { f.Fatalf("value %s has nil arg", v.LongString()) } if v.Op != OpPhi { // For non-Phi ops, memory args must be last, if present if arg.Type.IsMemory() && i != len(v.Args)-1 { f.Fatalf("value %s has non-final memory arg (%d < %d)", v.LongString(), i, len(v.Args)-1) } } } if valueMark[v.ID] { f.Fatalf("value %s appears twice!", v.LongString()) } valueMark[v.ID] = true if v.Block != b { f.Fatalf("%s.block != %s", v, b) } if v.Op == OpPhi && len(v.Args) != len(b.Preds) { f.Fatalf("phi length %s does not match pred length %d for block %s", v.LongString(), len(b.Preds), b) } if v.Op == OpAddr { if len(v.Args) == 0 { f.Fatalf("no args for OpAddr %s", v.LongString()) } if v.Args[0].Op != OpSB { f.Fatalf("bad arg to OpAddr %v", v) } } if v.Op == OpLocalAddr { if len(v.Args) != 2 { f.Fatalf("wrong # of args for OpLocalAddr %s", v.LongString()) } if v.Args[0].Op != OpSP { f.Fatalf("bad arg 0 to OpLocalAddr %v", v) } if !v.Args[1].Type.IsMemory() { f.Fatalf("bad arg 1 to OpLocalAddr %v", v) } } if f.RegAlloc != nil && f.Config.SoftFloat && v.Type.IsFloat() { f.Fatalf("unexpected floating-point type %v", v.LongString()) } // Check types. // TODO: more type checks? switch c := f.Config; v.Op { case OpSP, OpSB: if v.Type != c.Types.Uintptr { f.Fatalf("bad %s type: want uintptr, have %s", v.Op, v.Type.String()) } } // TODO: check for cycles in values } } // Check to make sure all Blocks referenced are in the function. if !blockMark[f.Entry.ID] { f.Fatalf("entry block %v is missing", f.Entry) } for _, b := range f.Blocks { for _, c := range b.Preds { if !blockMark[c.b.ID] { f.Fatalf("predecessor block %v for %v is missing", c, b) } } for _, c := range b.Succs { if !blockMark[c.b.ID] { f.Fatalf("successor block %v for %v is missing", c, b) } } } if len(f.Entry.Preds) > 0 { f.Fatalf("entry block %s of %s has predecessor(s) %v", f.Entry, f.Name, f.Entry.Preds) } // Check to make sure all Values referenced are in the function. for _, b := range f.Blocks { for _, v := range b.Values { for i, a := range v.Args { if !valueMark[a.ID] { f.Fatalf("%v, arg %d of %s, is missing", a, i, v.LongString()) } } } for _, c := range b.ControlValues() { if !valueMark[c.ID] { f.Fatalf("control value for %s is missing: %v", b, c) } } } for b := f.freeBlocks; b != nil; b = b.succstorage[0].b { if blockMark[b.ID] { f.Fatalf("used block b%d in free list", b.ID) } } for v := f.freeValues; v != nil; v = v.argstorage[0] { if valueMark[v.ID] { f.Fatalf("used value v%d in free list", v.ID) } } // Check to make sure all args dominate uses. if f.RegAlloc == nil { // Note: regalloc introduces non-dominating args. // See TODO in regalloc.go. sdom := f.Sdom() for _, b := range f.Blocks { for _, v := range b.Values { for i, arg := range v.Args { x := arg.Block y := b if v.Op == OpPhi { y = b.Preds[i].b } if !domCheck(f, sdom, x, y) { f.Fatalf("arg %d of value %s does not dominate, arg=%s", i, v.LongString(), arg.LongString()) } } } for _, c := range b.ControlValues() { if !domCheck(f, sdom, c.Block, b) { f.Fatalf("control value %s for %s doesn't dominate", c, b) } } } } // Check loop construction if f.RegAlloc == nil && f.pass != nil { // non-nil pass allows better-targeted debug printing ln := f.loopnest() if !ln.hasIrreducible { po := f.postorder() // use po to avoid unreachable blocks. for _, b := range po { for _, s := range b.Succs { bb := s.Block() if ln.b2l[b.ID] == nil && ln.b2l[bb.ID] != nil && bb != ln.b2l[bb.ID].header { f.Fatalf("block %s not in loop branches to non-header block %s in loop", b.String(), bb.String()) } if ln.b2l[b.ID] != nil && ln.b2l[bb.ID] != nil && bb != ln.b2l[bb.ID].header && !ln.b2l[b.ID].isWithinOrEq(ln.b2l[bb.ID]) { f.Fatalf("block %s in loop branches to non-header block %s in non-containing loop", b.String(), bb.String()) } } } } } // Check use counts uses := make([]int32, f.NumValues()) for _, b := range f.Blocks { for _, v := range b.Values { for _, a := range v.Args { uses[a.ID]++ } } for _, c := range b.ControlValues() { uses[c.ID]++ } } for _, b := range f.Blocks { for _, v := range b.Values { if v.Uses != uses[v.ID] { f.Fatalf("%s has %d uses, but has Uses=%d", v, uses[v.ID], v.Uses) } } } memCheck(f) } func memCheck(f *Func) { // Check that if a tuple has a memory type, it is second. for _, b := range f.Blocks { for _, v := range b.Values { if v.Type.IsTuple() && v.Type.FieldType(0).IsMemory() { f.Fatalf("memory is first in a tuple: %s\n", v.LongString()) } } } // Single live memory checks. // These checks only work if there are no memory copies. // (Memory copies introduce ambiguity about which mem value is really live. // probably fixable, but it's easier to avoid the problem.) // For the same reason, disable this check if some memory ops are unused. for _, b := range f.Blocks { for _, v := range b.Values { if (v.Op == OpCopy || v.Uses == 0) && v.Type.IsMemory() { return } } if b != f.Entry && len(b.Preds) == 0 { return } } // Compute live memory at the end of each block. lastmem := make([]*Value, f.NumBlocks()) ss := newSparseSet(f.NumValues()) for _, b := range f.Blocks { // Mark overwritten memory values. Those are args of other // ops that generate memory values. ss.clear() for _, v := range b.Values { if v.Op == OpPhi || !v.Type.IsMemory() { continue } if m := v.MemoryArg(); m != nil { ss.add(m.ID) } } // There should be at most one remaining unoverwritten memory value. for _, v := range b.Values { if !v.Type.IsMemory() { continue } if ss.contains(v.ID) { continue } if lastmem[b.ID] != nil { f.Fatalf("two live memory values in %s: %s and %s", b, lastmem[b.ID], v) } lastmem[b.ID] = v } // If there is no remaining memory value, that means there was no memory update. // Take any memory arg. if lastmem[b.ID] == nil { for _, v := range b.Values { if v.Op == OpPhi { continue } m := v.MemoryArg() if m == nil { continue } if lastmem[b.ID] != nil && lastmem[b.ID] != m { f.Fatalf("two live memory values in %s: %s and %s", b, lastmem[b.ID], m) } lastmem[b.ID] = m } } } // Propagate last live memory through storeless blocks. for { changed := false for _, b := range f.Blocks { if lastmem[b.ID] != nil { continue } for _, e := range b.Preds { p := e.b if lastmem[p.ID] != nil { lastmem[b.ID] = lastmem[p.ID] changed = true break } } } if !changed { break } } // Check merge points. for _, b := range f.Blocks { for _, v := range b.Values { if v.Op == OpPhi && v.Type.IsMemory() { for i, a := range v.Args { if a != lastmem[b.Preds[i].b.ID] { f.Fatalf("inconsistent memory phi %s %d %s %s", v.LongString(), i, a, lastmem[b.Preds[i].b.ID]) } } } } } // Check that only one memory is live at any point. if f.scheduled { for _, b := range f.Blocks { var mem *Value // the current live memory in the block for _, v := range b.Values { if v.Op == OpPhi { if v.Type.IsMemory() { mem = v } continue } if mem == nil && len(b.Preds) > 0 { // If no mem phi, take mem of any predecessor. mem = lastmem[b.Preds[0].b.ID] } for _, a := range v.Args { if a.Type.IsMemory() && a != mem { f.Fatalf("two live mems @ %s: %s and %s", v, mem, a) } } if v.Type.IsMemory() { mem = v } } } } // Check that after scheduling, phis are always first in the block. if f.scheduled { for _, b := range f.Blocks { seenNonPhi := false for _, v := range b.Values { switch v.Op { case OpPhi: if seenNonPhi { f.Fatalf("phi after non-phi @ %s: %s", b, v) } default: seenNonPhi = true } } } } } // domCheck reports whether x dominates y (including x==y). func domCheck(f *Func, sdom SparseTree, x, y *Block) bool { if !sdom.IsAncestorEq(f.Entry, y) { // unreachable - ignore return true } return sdom.IsAncestorEq(x, y) } // isExactFloat32 reports whether x can be exactly represented as a float32. func isExactFloat32(x float64) bool { // Check the mantissa is in range. if bits.TrailingZeros64(math.Float64bits(x)) < 52-23 { return false } // Check the exponent is in range. The mantissa check above is sufficient for NaN values. return math.IsNaN(x) || x == float64(float32(x)) }
Close