OXIESEC PANEL
- Current Dir:
/
/
opt
/
golang
/
1.22.0
/
test
Server IP: 2a02:4780:11:1084:0:327f:3464:10
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
08/12/2024 06:18:01 PM
rwxr-xr-x
📄
235.go
1.56 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
64bit.go
24.83 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
README.md
731 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📁
abi
-
02/02/2024 06:09:55 PM
rwxr-xr-x
📄
alg.go
822 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
alias.go
588 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
alias1.go
803 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
alias2.go
2.5 KB
02/02/2024 06:09:55 PM
rw-r--r--
📁
alias3.dir
-
02/02/2024 06:09:55 PM
rwxr-xr-x
📄
alias3.go
187 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
align.go
603 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
append.go
9.09 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
append1.go
856 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📁
arenas
-
02/02/2024 06:09:55 PM
rwxr-xr-x
📄
args.go
374 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
armimm.go
3.85 KB
02/02/2024 06:09:55 PM
rw-r--r--
📁
asmhdr.dir
-
02/02/2024 06:09:55 PM
rwxr-xr-x
📄
asmhdr.go
237 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
assign.go
1.01 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
assign1.go
5.55 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
atomicload.go
798 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
bigalg.go
2.12 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
bigmap.go
2.46 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
blank.go
2.1 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
blank1.go
724 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
bom.go
406 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
bombad.go
480 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
bounds.go
6.09 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
cannotassign.go
1.04 KB
02/02/2024 06:09:55 PM
rw-r--r--
📁
chan
-
02/02/2024 06:09:55 PM
rwxr-xr-x
📄
chancap.go
1.57 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
chanlinear.go
2.12 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
char_lit.go
657 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
char_lit1.go
822 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
checkbce.go
3.7 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
clear.go
743 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
clearfat.go
1.15 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
closedchan.go
5.79 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
closure.go
1.69 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
closure1.go
280 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
closure2.go
1.87 KB
02/02/2024 06:09:55 PM
rw-r--r--
📁
closure3.dir
-
02/02/2024 06:09:55 PM
rwxr-xr-x
📄
closure3.go
358 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
closure4.go
364 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📁
closure5.dir
-
02/02/2024 06:09:55 PM
rwxr-xr-x
📄
closure5.go
280 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
closure6.go
346 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
closure7.go
373 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
cmp.go
7.63 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
cmp6.go
2.16 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
cmplx.go
1.39 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
cmplxdivide.c
2.05 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
cmplxdivide.go
868 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
cmplxdivide1.go
240.68 KB
02/02/2024 06:09:55 PM
rw-r--r--
📁
codegen
-
02/02/2024 06:09:55 PM
rwxr-xr-x
📄
complit.go
1.71 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
complit1.go
1.63 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
compos.go
403 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
const.go
4.78 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
const1.go
3.79 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
const2.go
1008 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
const3.go
659 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
const4.go
1.28 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
const5.go
835 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
const6.go
834 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
const7.go
1.93 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
const8.go
727 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
convT2X.go
3.33 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
convert.go
833 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
convert1.go
3.41 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
convert2.go
5.87 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
convert3.go
544 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
convert4.go
2.09 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
convinline.go
4.72 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
convlit.go
2.39 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
convlit1.go
458 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
copy.go
6.6 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
copy1.go
851 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
crlf.go
782 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
ddd.go
4.23 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
ddd1.go
1.7 KB
02/02/2024 06:09:55 PM
rw-r--r--
📁
ddd2.dir
-
02/02/2024 06:09:55 PM
rwxr-xr-x
📄
ddd2.go
252 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
decl.go
926 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
declbad.go
1.43 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
defer.go
875 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
defererrcheck.go
1.4 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
deferfin.go
1.05 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
defernil.go
563 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
deferprint.go
586 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
deferprint.out
126 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
devirt.go
574 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
directive.go
1.06 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
directive2.go
1.16 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
divide.go
1.22 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
divmod.go
9.28 KB
02/02/2024 06:09:55 PM
rw-r--r--
📁
dwarf
-
02/02/2024 06:09:55 PM
rwxr-xr-x
📄
embedfunc.go
308 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
embedvers.go
292 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
empty.go
316 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
env.go
549 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
eof.go
308 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
eof1.go
333 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
escape.go
3.8 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
escape2.go
35.11 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
escape2n.go
35.14 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
escape3.go
524 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
escape4.go
1.4 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
escape5.go
5.31 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
escape_array.go
3.64 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
escape_calls.go
1.63 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
escape_closure.go
4.65 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
escape_field.go
2.92 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
escape_goto.go
677 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
escape_hash_maphash.go
368 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
escape_iface.go
4.53 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
escape_indir.go
3.31 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
escape_level.go
1.79 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
escape_map.go
2.76 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
escape_mutations.go
1.79 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
escape_param.go
8.9 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
escape_reflect.go
13.05 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
escape_runtime_atomic.go
874 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
escape_selfassign.go
538 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
escape_slice.go
3.89 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
escape_struct_param1.go
8.9 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
escape_struct_param2.go
8.94 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
escape_struct_return.go
1.04 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
escape_sync_atomic.go
943 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
escape_unsafe.go
2.17 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
fibo.go
6.28 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
finprofiled.go
2.1 KB
02/02/2024 06:09:55 PM
rw-r--r--
📁
fixedbugs
-
02/02/2024 06:09:55 PM
rwxr-xr-x
📄
float_lit.go
3.95 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
float_lit2.go
7.88 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
float_lit3.go
1.72 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
floatcmp.go
3.03 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
for.go
1.2 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
func.go
1.29 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
func1.go
445 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
func2.go
578 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
func3.go
505 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
func4.go
409 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
func5.go
1.49 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
func6.go
393 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
func7.go
477 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
func8.go
599 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
funcdup.go
1.31 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
funcdup2.go
721 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
fuse.go
5.33 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
gc.go
411 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
gc1.go
303 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
gc2.go
977 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
gcgort.go
34.54 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
gcstring.go
872 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
goprint.go
722 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
goprint.out
65 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
goto.go
8.39 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
heapsampling.go
9.67 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
helloworld.go
269 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
helloworld.out
13 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
if.go
1.36 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
import.go
425 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
import1.go
703 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📁
import2.dir
-
02/02/2024 06:09:55 PM
rwxr-xr-x
📄
import2.go
247 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📁
import4.dir
-
02/02/2024 06:09:55 PM
rwxr-xr-x
📄
import4.go
310 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
import5.go
722 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
import6.go
1.44 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
index.go
6.42 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
index0.go
301 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
index1.go
305 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
index2.go
305 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
indirect.go
1.39 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
indirect1.go
1.53 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
init.go
479 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
init1.go
1.08 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
initcomma.go
1.22 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
initexp.go
1.74 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
initialize.go
2.16 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
initializerr.go
1.15 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
initloop.go
407 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
inline.go
11.69 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
inline_big.go
12.69 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
inline_caller.go
1.36 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
inline_callers.go
1.87 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
inline_endian.go
1.63 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
inline_literal.go
1.02 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
inline_math_bits_rotate.go
571 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
inline_sync.go
1.62 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
inline_variadic.go
513 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
int_lit.go
387 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
intcvt.go
4.26 KB
02/02/2024 06:09:55 PM
rw-r--r--
📁
interface
-
02/02/2024 06:09:55 PM
rwxr-xr-x
📁
intrinsic.dir
-
02/02/2024 06:09:55 PM
rwxr-xr-x
📄
intrinsic.go
270 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
intrinsic_atomic.go
839 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
iota.go
1.59 KB
02/02/2024 06:09:55 PM
rw-r--r--
📁
ken
-
02/02/2024 06:09:55 PM
rwxr-xr-x
📄
label.go
1.02 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
label1.go
2.08 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
linkmain.go
237 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
linkmain_run.go
2.28 KB
02/02/2024 06:09:55 PM
rw-r--r--
📁
linkname.dir
-
02/02/2024 06:09:55 PM
rwxr-xr-x
📄
linkname.go
456 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
linkname3.go
597 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
linkobj.go
3.55 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
linkx.go
741 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
linkx_run.go
1.67 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
literal.go
4.99 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
literal2.go
2.22 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
live.go
18.03 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
live1.go
1.29 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
live2.go
953 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
live_regabi.go
18.36 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
live_uintptrkeepalive.go
2.02 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
loopbce.go
13.81 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
mainsig.go
598 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
makechan.go
1.04 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
makemap.go
1.3 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
makenew.go
605 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
makeslice.go
5.49 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
mallocfin.go
1.18 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
map.go
14.91 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
map1.go
1.47 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
mapclear.go
1.49 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
maplinear.go
3.62 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
maymorestack.go
1.05 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
mergemul.go
3.16 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
method.go
5.24 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
method1.go
739 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
method2.go
1.21 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
method3.go
570 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📁
method4.dir
-
02/02/2024 06:09:55 PM
rwxr-xr-x
📄
method4.go
230 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
method5.go
6.73 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
method6.go
467 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
method7.go
1.15 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
named.go
4.61 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
named1.go
984 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
newinline.go
11.16 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
nil.go
2.23 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
nilcheck.go
3.67 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
nilptr.go
3.15 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
nilptr2.go
3.6 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
nilptr3.go
5.65 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
nilptr4.go
428 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
nilptr5.go
844 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
nilptr5_aix.go
806 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
nilptr5_wasm.go
813 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
nilptr_aix.go
3.09 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
noinit.go
6.79 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
nosplit.go
11.28 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
nowritebarrier.go
1.31 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
nul1.go
1.23 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
opt_branchlikely.go
2.08 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
parentype.go
424 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
peano.go
2.22 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
phiopt.go
2.03 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
print.go
1.56 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
print.out
247 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
printbig.go
315 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
printbig.out
41 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
prove.go
21.08 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
prove_constant_folding.go
604 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
prove_invert_loop_with_unused_iterators.go
225 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
range.go
8.14 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
range2.go
830 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
range3.go
1.27 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
range4.go
5.11 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
rangegen.go
8.35 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
recover.go
10.64 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
recover1.go
2.5 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
recover2.go
1.22 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
recover3.go
1.64 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
recover4.go
2.2 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
recover5.go
408 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
reflectmethod1.go
578 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
reflectmethod2.go
719 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
reflectmethod3.go
651 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
reflectmethod4.go
573 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
reflectmethod5.go
544 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
reflectmethod6.go
555 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
reflectmethod7.go
421 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
reflectmethod8.go
479 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
rename.go
1.52 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
rename1.go
1.14 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
reorder.go
2.28 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
reorder2.go
7.22 KB
02/02/2024 06:09:55 PM
rw-r--r--
📁
retjmp.dir
-
02/02/2024 06:09:55 PM
rwxr-xr-x
📄
retjmp.go
252 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
return.go
32.69 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
rotate.go
3.27 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
rotate0.go
286 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
rotate1.go
286 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
rotate2.go
286 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
rotate3.go
286 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
rune.go
603 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📁
runtime
-
02/02/2024 06:09:55 PM
rwxr-xr-x
📄
runtime.go
600 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
shift1.go
9.43 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
shift2.go
1.31 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
shift3.go
834 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
sieve.go
1 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
sigchld.go
381 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
sigchld.out
17 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
simassign.go
1.12 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
sizeof.go
2.95 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
slice3.go
2.92 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
slice3err.go
5.19 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
slicecap.go
1.85 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
sliceopt.go
735 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
solitaire.go
2.9 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
stack.go
1.69 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
stackobj.go
975 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
stackobj2.go
1.55 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
stackobj3.go
1.42 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
strcopy.go
674 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
strength.go
1.02 KB
02/02/2024 06:09:55 PM
rw-r--r--
📁
stress
-
02/02/2024 06:09:55 PM
rwxr-xr-x
📄
string_lit.go
3.58 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
stringrange.go
1.45 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
struct0.go
565 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
switch.go
6.53 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
switch2.go
775 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
switch3.go
1.24 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
switch4.go
526 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
switch5.go
2.25 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
switch6.go
1.13 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
switch7.go
796 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📁
syntax
-
02/02/2024 06:09:55 PM
rwxr-xr-x
📄
tighten.go
513 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
tinyfin.go
1.57 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
torture.go
7.69 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
turing.go
893 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
typecheck.go
543 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
typecheckloop.go
528 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📁
typeparam
-
02/02/2024 06:09:55 PM
rwxr-xr-x
📄
typeswitch.go
1.83 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
typeswitch1.go
1.6 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
typeswitch2.go
655 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
typeswitch2b.go
598 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
typeswitch3.go
999 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📁
uintptrescapes.dir
-
02/02/2024 06:09:55 PM
rwxr-xr-x
📄
uintptrescapes.go
250 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
uintptrescapes2.go
2.16 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
uintptrescapes3.go
1.28 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
uintptrkeepalive.go
297 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
undef.go
758 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
unsafe_slice_data.go
481 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
unsafe_string.go
367 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
unsafe_string_data.go
479 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
unsafebuiltins.go
2.33 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
used.go
5.96 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
utf.go
1.19 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
varerr.go
449 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
varinit.go
509 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
winbatch.go
1.97 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
writebarrier.go
5.88 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
zerodivide.go
5.71 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
zerosize.go
814 bytes
02/02/2024 06:09:55 PM
rw-r--r--
Editing: prove.go
Close
// errorcheck -0 -d=ssa/prove/debug=1 //go:build amd64 // Copyright 2016 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 main import "math" func f0(a []int) int { a[0] = 1 a[0] = 1 // ERROR "Proved IsInBounds$" a[6] = 1 a[6] = 1 // ERROR "Proved IsInBounds$" a[5] = 1 // ERROR "Proved IsInBounds$" a[5] = 1 // ERROR "Proved IsInBounds$" return 13 } func f1(a []int) int { if len(a) <= 5 { return 18 } a[0] = 1 // ERROR "Proved IsInBounds$" a[0] = 1 // ERROR "Proved IsInBounds$" a[6] = 1 a[6] = 1 // ERROR "Proved IsInBounds$" a[5] = 1 // ERROR "Proved IsInBounds$" a[5] = 1 // ERROR "Proved IsInBounds$" return 26 } func f1b(a []int, i int, j uint) int { if i >= 0 && i < len(a) { return a[i] // ERROR "Proved IsInBounds$" } if i >= 10 && i < len(a) { return a[i] // ERROR "Proved IsInBounds$" } if i >= 10 && i < len(a) { return a[i] // ERROR "Proved IsInBounds$" } if i >= 10 && i < len(a) { return a[i-10] // ERROR "Proved IsInBounds$" } if j < uint(len(a)) { return a[j] // ERROR "Proved IsInBounds$" } return 0 } func f1c(a []int, i int64) int { c := uint64(math.MaxInt64 + 10) // overflows int d := int64(c) if i >= d && i < int64(len(a)) { // d overflows, should not be handled. return a[i] } return 0 } func f2(a []int) int { for i := range a { // ERROR "Induction variable: limits \[0,\?\), increment 1$" a[i+1] = i a[i+1] = i // ERROR "Proved IsInBounds$" } return 34 } func f3(a []uint) int { for i := uint(0); i < uint(len(a)); i++ { a[i] = i // ERROR "Proved IsInBounds$" } return 41 } func f4a(a, b, c int) int { if a < b { if a == b { // ERROR "Disproved Eq64$" return 47 } if a > b { // ERROR "Disproved Less64$" return 50 } if a < b { // ERROR "Proved Less64$" return 53 } // We can't get to this point and prove knows that, so // there's no message for the next (obvious) branch. if a != a { return 56 } return 61 } return 63 } func f4b(a, b, c int) int { if a <= b { if a >= b { if a == b { // ERROR "Proved Eq64$" return 70 } return 75 } return 77 } return 79 } func f4c(a, b, c int) int { if a <= b { if a >= b { if a != b { // ERROR "Disproved Neq64$" return 73 } return 75 } return 77 } return 79 } func f4d(a, b, c int) int { if a < b { if a < c { if a < b { // ERROR "Proved Less64$" if a < c { // ERROR "Proved Less64$" return 87 } return 89 } return 91 } return 93 } return 95 } func f4e(a, b, c int) int { if a < b { if b > a { // ERROR "Proved Less64$" return 101 } return 103 } return 105 } func f4f(a, b, c int) int { if a <= b { if b > a { if b == a { // ERROR "Disproved Eq64$" return 112 } return 114 } if b >= a { // ERROR "Proved Leq64$" if b == a { // ERROR "Proved Eq64$" return 118 } return 120 } return 122 } return 124 } func f5(a, b uint) int { if a == b { if a <= b { // ERROR "Proved Leq64U$" return 130 } return 132 } return 134 } // These comparisons are compile time constants. func f6a(a uint8) int { if a < a { // ERROR "Disproved Less8U$" return 140 } return 151 } func f6b(a uint8) int { if a < a { // ERROR "Disproved Less8U$" return 140 } return 151 } func f6x(a uint8) int { if a > a { // ERROR "Disproved Less8U$" return 143 } return 151 } func f6d(a uint8) int { if a <= a { // ERROR "Proved Leq8U$" return 146 } return 151 } func f6e(a uint8) int { if a >= a { // ERROR "Proved Leq8U$" return 149 } return 151 } func f7(a []int, b int) int { if b < len(a) { a[b] = 3 if b < len(a) { // ERROR "Proved Less64$" a[b] = 5 // ERROR "Proved IsInBounds$" } } return 161 } func f8(a, b uint) int { if a == b { return 166 } if a > b { return 169 } if a < b { // ERROR "Proved Less64U$" return 172 } return 174 } func f9(a, b bool) int { if a { return 1 } if a || b { // ERROR "Disproved Arg$" return 2 } return 3 } func f10(a string) int { n := len(a) // We optimize comparisons with small constant strings (see cmd/compile/internal/gc/walk.go), // so this string literal must be long. if a[:n>>1] == "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" { return 0 } return 1 } func f11a(a []int, i int) { useInt(a[i]) useInt(a[i]) // ERROR "Proved IsInBounds$" } func f11b(a []int, i int) { useSlice(a[i:]) useSlice(a[i:]) // ERROR "Proved IsSliceInBounds$" } func f11c(a []int, i int) { useSlice(a[:i]) useSlice(a[:i]) // ERROR "Proved IsSliceInBounds$" } func f11d(a []int, i int) { useInt(a[2*i+7]) useInt(a[2*i+7]) // ERROR "Proved IsInBounds$" } func f12(a []int, b int) { useSlice(a[:b]) } func f13a(a, b, c int, x bool) int { if a > 12 { if x { if a < 12 { // ERROR "Disproved Less64$" return 1 } } if x { if a <= 12 { // ERROR "Disproved Leq64$" return 2 } } if x { if a == 12 { // ERROR "Disproved Eq64$" return 3 } } if x { if a >= 12 { // ERROR "Proved Leq64$" return 4 } } if x { if a > 12 { // ERROR "Proved Less64$" return 5 } } return 6 } return 0 } func f13b(a int, x bool) int { if a == -9 { if x { if a < -9 { // ERROR "Disproved Less64$" return 7 } } if x { if a <= -9 { // ERROR "Proved Leq64$" return 8 } } if x { if a == -9 { // ERROR "Proved Eq64$" return 9 } } if x { if a >= -9 { // ERROR "Proved Leq64$" return 10 } } if x { if a > -9 { // ERROR "Disproved Less64$" return 11 } } return 12 } return 0 } func f13c(a int, x bool) int { if a < 90 { if x { if a < 90 { // ERROR "Proved Less64$" return 13 } } if x { if a <= 90 { // ERROR "Proved Leq64$" return 14 } } if x { if a == 90 { // ERROR "Disproved Eq64$" return 15 } } if x { if a >= 90 { // ERROR "Disproved Leq64$" return 16 } } if x { if a > 90 { // ERROR "Disproved Less64$" return 17 } } return 18 } return 0 } func f13d(a int) int { if a < 5 { if a < 9 { // ERROR "Proved Less64$" return 1 } } return 0 } func f13e(a int) int { if a > 9 { if a > 5 { // ERROR "Proved Less64$" return 1 } } return 0 } func f13f(a int64) int64 { if a > math.MaxInt64 { if a == 0 { // ERROR "Disproved Eq64$" return 1 } } return 0 } func f13g(a int) int { if a < 3 { return 5 } if a > 3 { return 6 } if a == 3 { // ERROR "Proved Eq64$" return 7 } return 8 } func f13h(a int) int { if a < 3 { if a > 1 { if a == 2 { // ERROR "Proved Eq64$" return 5 } } } return 0 } func f13i(a uint) int { if a == 0 { return 1 } if a > 0 { // ERROR "Proved Less64U$" return 2 } return 3 } func f14(p, q *int, a []int) { // This crazy ordering usually gives i1 the lowest value ID, // j the middle value ID, and i2 the highest value ID. // That used to confuse CSE because it ordered the args // of the two + ops below differently. // That in turn foiled bounds check elimination. i1 := *p j := *q i2 := *p useInt(a[i1+j]) useInt(a[i2+j]) // ERROR "Proved IsInBounds$" } func f15(s []int, x int) { useSlice(s[x:]) useSlice(s[:x]) // ERROR "Proved IsSliceInBounds$" } func f16(s []int) []int { if len(s) >= 10 { return s[:10] // ERROR "Proved IsSliceInBounds$" } return nil } func f17(b []int) { for i := 0; i < len(b); i++ { // ERROR "Induction variable: limits \[0,\?\), increment 1$" // This tests for i <= cap, which we can only prove // using the derived relation between len and cap. // This depends on finding the contradiction, since we // don't query this condition directly. useSlice(b[:i]) // ERROR "Proved IsSliceInBounds$" } } func f18(b []int, x int, y uint) { _ = b[x] _ = b[y] if x > len(b) { // ERROR "Disproved Less64$" return } if y > uint(len(b)) { // ERROR "Disproved Less64U$" return } if int(y) > len(b) { // ERROR "Disproved Less64$" return } } func f19() (e int64, err error) { // Issue 29502: slice[:0] is incorrectly disproved. var stack []int64 stack = append(stack, 123) if len(stack) > 1 { panic("too many elements") } last := len(stack) - 1 e = stack[last] // Buggy compiler prints "Disproved Leq64" for the next line. stack = stack[:last] return e, nil } func sm1(b []int, x int) { // Test constant argument to slicemask. useSlice(b[2:8]) // ERROR "Proved slicemask not needed$" // Test non-constant argument with known limits. if cap(b) > 10 { useSlice(b[2:]) } } func lim1(x, y, z int) { // Test relations between signed and unsigned limits. if x > 5 { if uint(x) > 5 { // ERROR "Proved Less64U$" return } } if y >= 0 && y < 4 { if uint(y) > 4 { // ERROR "Disproved Less64U$" return } if uint(y) < 5 { // ERROR "Proved Less64U$" return } } if z < 4 { if uint(z) > 4 { // Not provable without disjunctions. return } } } // fence1–4 correspond to the four fence-post implications. func fence1(b []int, x, y int) { // Test proofs that rely on fence-post implications. if x+1 > y { if x < y { // ERROR "Disproved Less64$" return } } if len(b) < cap(b) { // This eliminates the growslice path. b = append(b, 1) // ERROR "Disproved Less64U$" } } func fence2(x, y int) { if x-1 < y { if x > y { // ERROR "Disproved Less64$" return } } } func fence3(b, c []int, x, y int64) { if x-1 >= y { if x <= y { // Can't prove because x may have wrapped. return } } if x != math.MinInt64 && x-1 >= y { if x <= y { // ERROR "Disproved Leq64$" return } } c[len(c)-1] = 0 // Can't prove because len(c) might be 0 if n := len(b); n > 0 { b[n-1] = 0 // ERROR "Proved IsInBounds$" } } func fence4(x, y int64) { if x >= y+1 { if x <= y { return } } if y != math.MaxInt64 && x >= y+1 { if x <= y { // ERROR "Disproved Leq64$" return } } } // Check transitive relations func trans1(x, y int64) { if x > 5 { if y > x { if y > 2 { // ERROR "Proved Less64$" return } } else if y == x { if y > 5 { // ERROR "Proved Less64$" return } } } if x >= 10 { if y > x { if y > 10 { // ERROR "Proved Less64$" return } } } } func trans2(a, b []int, i int) { if len(a) != len(b) { return } _ = a[i] _ = b[i] // ERROR "Proved IsInBounds$" } func trans3(a, b []int, i int) { if len(a) > len(b) { return } _ = a[i] _ = b[i] // ERROR "Proved IsInBounds$" } func trans4(b []byte, x int) { // Issue #42603: slice len/cap transitive relations. switch x { case 0: if len(b) < 20 { return } _ = b[:2] // ERROR "Proved IsSliceInBounds$" case 1: if len(b) < 40 { return } _ = b[:2] // ERROR "Proved IsSliceInBounds$" } } // Derived from nat.cmp func natcmp(x, y []uint) (r int) { m := len(x) n := len(y) if m != n || m == 0 { return } i := m - 1 for i > 0 && // ERROR "Induction variable: limits \(0,\?\], increment 1$" x[i] == // ERROR "Proved IsInBounds$" y[i] { // ERROR "Proved IsInBounds$" i-- } switch { case x[i] < // todo, cannot prove this because it's dominated by i<=0 || x[i]==y[i] y[i]: // ERROR "Proved IsInBounds$" r = -1 case x[i] > // ERROR "Proved IsInBounds$" y[i]: // ERROR "Proved IsInBounds$" r = 1 } return } func suffix(s, suffix string) bool { // todo, we're still not able to drop the bound check here in the general case return len(s) >= len(suffix) && s[len(s)-len(suffix):] == suffix } func constsuffix(s string) bool { return suffix(s, "abc") // ERROR "Proved IsSliceInBounds$" } // oforuntil tests the pattern created by OFORUNTIL blocks. These are // handled by addLocalInductiveFacts rather than findIndVar. func oforuntil(b []int) { i := 0 if len(b) > i { top: println(b[i]) // ERROR "Induction variable: limits \[0,\?\), increment 1$" "Proved IsInBounds$" i++ if i < len(b) { goto top } } } func atexit(foobar []func()) { for i := len(foobar) - 1; i >= 0; i-- { // ERROR "Induction variable: limits \[0,\?\], increment 1" f := foobar[i] foobar = foobar[:i] // ERROR "IsSliceInBounds" f() } } func make1(n int) []int { s := make([]int, n) for i := 0; i < n; i++ { // ERROR "Induction variable: limits \[0,\?\), increment 1" s[i] = 1 // ERROR "Proved IsInBounds$" } return s } func make2(n int) []int { s := make([]int, n) for i := range s { // ERROR "Induction variable: limits \[0,\?\), increment 1" s[i] = 1 // ERROR "Proved IsInBounds$" } return s } // The range tests below test the index variable of range loops. // range1 compiles to the "efficiently indexable" form of a range loop. func range1(b []int) { for i, v := range b { // ERROR "Induction variable: limits \[0,\?\), increment 1$" b[i] = v + 1 // ERROR "Proved IsInBounds$" if i < len(b) { // ERROR "Proved Less64$" println("x") } if i >= 0 { // ERROR "Proved Leq64$" println("x") } } } // range2 elements are larger, so they use the general form of a range loop. func range2(b [][32]int) { for i, v := range b { // ERROR "Induction variable: limits \[0,\?\), increment 1$" b[i][0] = v[0] + 1 // ERROR "Proved IsInBounds$" if i < len(b) { // ERROR "Proved Less64$" println("x") } if i >= 0 { // ERROR "Proved Leq64$" println("x") } } } // signhint1-2 test whether the hint (int >= 0) is propagated into the loop. func signHint1(i int, data []byte) { if i >= 0 { for i < len(data) { // ERROR "Induction variable: limits \[\?,\?\), increment 1$" _ = data[i] // ERROR "Proved IsInBounds$" i++ } } } func signHint2(b []byte, n int) { if n < 0 { panic("") } _ = b[25] for i := n; i <= 25; i++ { // ERROR "Induction variable: limits \[\?,25\], increment 1$" b[i] = 123 // ERROR "Proved IsInBounds$" } } // indexGT0 tests whether prove learns int index >= 0 from bounds check. func indexGT0(b []byte, n int) { _ = b[n] _ = b[25] for i := n; i <= 25; i++ { // ERROR "Induction variable: limits \[\?,25\], increment 1$" b[i] = 123 // ERROR "Proved IsInBounds$" } } // Induction variable in unrolled loop. func unrollUpExcl(a []int) int { var i, x int for i = 0; i < len(a)-1; i += 2 { // ERROR "Induction variable: limits \[0,\?\), increment 2$" x += a[i] // ERROR "Proved IsInBounds$" x += a[i+1] } if i == len(a)-1 { x += a[i] } return x } // Induction variable in unrolled loop. func unrollUpIncl(a []int) int { var i, x int for i = 0; i <= len(a)-2; i += 2 { // ERROR "Induction variable: limits \[0,\?\], increment 2$" x += a[i] // ERROR "Proved IsInBounds$" x += a[i+1] } if i == len(a)-1 { x += a[i] } return x } // Induction variable in unrolled loop. func unrollDownExcl0(a []int) int { var i, x int for i = len(a) - 1; i > 0; i -= 2 { // ERROR "Induction variable: limits \(0,\?\], increment 2$" x += a[i] // ERROR "Proved IsInBounds$" x += a[i-1] // ERROR "Proved IsInBounds$" } if i == 0 { x += a[i] } return x } // Induction variable in unrolled loop. func unrollDownExcl1(a []int) int { var i, x int for i = len(a) - 1; i >= 1; i -= 2 { // ERROR "Induction variable: limits \(0,\?\], increment 2$" x += a[i] // ERROR "Proved IsInBounds$" x += a[i-1] // ERROR "Proved IsInBounds$" } if i == 0 { x += a[i] } return x } // Induction variable in unrolled loop. func unrollDownInclStep(a []int) int { var i, x int for i = len(a); i >= 2; i -= 2 { // ERROR "Induction variable: limits \[2,\?\], increment 2$" x += a[i-1] // ERROR "Proved IsInBounds$" x += a[i-2] // ERROR "Proved IsInBounds$" } if i == 1 { x += a[i-1] } return x } // Not an induction variable (step too large) func unrollExclStepTooLarge(a []int) int { var i, x int for i = 0; i < len(a)-1; i += 3 { x += a[i] x += a[i+1] } if i == len(a)-1 { x += a[i] } return x } // Not an induction variable (step too large) func unrollInclStepTooLarge(a []int) int { var i, x int for i = 0; i <= len(a)-2; i += 3 { x += a[i] x += a[i+1] } if i == len(a)-1 { x += a[i] } return x } // Not an induction variable (min too small, iterating down) func unrollDecMin(a []int) int { var i, x int for i = len(a); i >= math.MinInt64; i -= 2 { x += a[i-1] x += a[i-2] } if i == 1 { // ERROR "Disproved Eq64$" x += a[i-1] } return x } // Not an induction variable (min too small, iterating up -- perhaps could allow, but why bother?) func unrollIncMin(a []int) int { var i, x int for i = len(a); i >= math.MinInt64; i += 2 { x += a[i-1] x += a[i-2] } if i == 1 { // ERROR "Disproved Eq64$" x += a[i-1] } return x } // The 4 xxxxExtNto64 functions below test whether prove is looking // through value-preserving sign/zero extensions of index values (issue #26292). // Look through all extensions func signExtNto64(x []int, j8 int8, j16 int16, j32 int32) int { if len(x) < 22 { return 0 } if j8 >= 0 && j8 < 22 { return x[j8] // ERROR "Proved IsInBounds$" } if j16 >= 0 && j16 < 22 { return x[j16] // ERROR "Proved IsInBounds$" } if j32 >= 0 && j32 < 22 { return x[j32] // ERROR "Proved IsInBounds$" } return 0 } func zeroExtNto64(x []int, j8 uint8, j16 uint16, j32 uint32) int { if len(x) < 22 { return 0 } if j8 >= 0 && j8 < 22 { return x[j8] // ERROR "Proved IsInBounds$" } if j16 >= 0 && j16 < 22 { return x[j16] // ERROR "Proved IsInBounds$" } if j32 >= 0 && j32 < 22 { return x[j32] // ERROR "Proved IsInBounds$" } return 0 } // Process fence-post implications through 32to64 extensions (issue #29964) func signExt32to64Fence(x []int, j int32) int { if x[j] != 0 { return 1 } if j > 0 && x[j-1] != 0 { // ERROR "Proved IsInBounds$" return 1 } return 0 } func zeroExt32to64Fence(x []int, j uint32) int { if x[j] != 0 { return 1 } if j > 0 && x[j-1] != 0 { // ERROR "Proved IsInBounds$" return 1 } return 0 } // Ensure that bounds checks with negative indexes are not incorrectly removed. func negIndex() { n := make([]int, 1) for i := -1; i <= 0; i++ { // ERROR "Induction variable: limits \[-1,0\], increment 1$" n[i] = 1 } } func negIndex2(n int) { a := make([]int, 5) b := make([]int, 5) c := make([]int, 5) for i := -1; i <= 0; i-- { b[i] = i n++ if n > 10 { break } } useSlice(a) useSlice(c) } // Check that prove is zeroing these right shifts of positive ints by bit-width - 1. // e.g (Rsh64x64 <t> n (Const64 <typ.UInt64> [63])) && ft.isNonNegative(n) -> 0 func sh64(n int64) int64 { if n < 0 { return n } return n >> 63 // ERROR "Proved Rsh64x64 shifts to zero" } func sh32(n int32) int32 { if n < 0 { return n } return n >> 31 // ERROR "Proved Rsh32x64 shifts to zero" } func sh32x64(n int32) int32 { if n < 0 { return n } return n >> uint64(31) // ERROR "Proved Rsh32x64 shifts to zero" } func sh16(n int16) int16 { if n < 0 { return n } return n >> 15 // ERROR "Proved Rsh16x64 shifts to zero" } func sh64noopt(n int64) int64 { return n >> 63 // not optimized; n could be negative } // These cases are division of a positive signed integer by a power of 2. // The opt pass doesnt have sufficient information to see that n is positive. // So, instead, opt rewrites the division with a less-than-optimal replacement. // Prove, which can see that n is nonnegative, cannot see the division because // opt, an earlier pass, has already replaced it. // The fix for this issue allows prove to zero a right shift that was added as // part of the less-than-optimal reqwrite. That change by prove then allows // lateopt to clean up all the unnecessary parts of the original division // replacement. See issue #36159. func divShiftClean(n int) int { if n < 0 { return n } return n / int(8) // ERROR "Proved Rsh64x64 shifts to zero" } func divShiftClean64(n int64) int64 { if n < 0 { return n } return n / int64(16) // ERROR "Proved Rsh64x64 shifts to zero" } func divShiftClean32(n int32) int32 { if n < 0 { return n } return n / int32(16) // ERROR "Proved Rsh32x64 shifts to zero" } // Bounds check elimination func sliceBCE1(p []string, h uint) string { if len(p) == 0 { return "" } i := h & uint(len(p)-1) return p[i] // ERROR "Proved IsInBounds$" } func sliceBCE2(p []string, h int) string { if len(p) == 0 { return "" } i := h & (len(p) - 1) return p[i] // ERROR "Proved IsInBounds$" } func and(p []byte) ([]byte, []byte) { // issue #52563 const blocksize = 16 fullBlocks := len(p) &^ (blocksize - 1) blk := p[:fullBlocks] // ERROR "Proved IsSliceInBounds$" rem := p[fullBlocks:] // ERROR "Proved IsSliceInBounds$" return blk, rem } func rshu(x, y uint) int { z := x >> y if z <= x { // ERROR "Proved Leq64U$" return 1 } return 0 } func divu(x, y uint) int { z := x / y if z <= x { // ERROR "Proved Leq64U$" return 1 } return 0 } func modu1(x, y uint) int { z := x % y if z < y { // ERROR "Proved Less64U$" return 1 } return 0 } func modu2(x, y uint) int { z := x % y if z <= x { // ERROR "Proved Leq64U$" return 1 } return 0 } func issue57077(s []int) (left, right []int) { middle := len(s) / 2 left = s[:middle] // ERROR "Proved IsSliceInBounds$" right = s[middle:] // ERROR "Proved IsSliceInBounds$" return } func issue51622(b []byte) int { if len(b) >= 3 && b[len(b)-3] == '#' { // ERROR "Proved IsInBounds$" return len(b) } return 0 } func issue45928(x int) { combinedFrac := x / (x | (1 << 31)) // ERROR "Proved Neq64$" useInt(combinedFrac) } //go:noinline func useInt(a int) { } //go:noinline func useSlice(a []int) { } func main() { }