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 /
test /
chan /
[ HOME SHELL ]
Name
Size
Permission
Action
doubleselect.go
1.96
KB
-rw-r--r--
fifo.go
896
B
-rw-r--r--
goroutines.go
743
B
-rw-r--r--
nonblock.go
3.93
KB
-rw-r--r--
perm.go
1.33
KB
-rw-r--r--
powser1.go
12.65
KB
-rw-r--r--
powser2.go
13.29
KB
-rw-r--r--
select.go
913
B
-rw-r--r--
select2.go
1.04
KB
-rw-r--r--
select3.go
4.07
KB
-rw-r--r--
select4.go
513
B
-rw-r--r--
select5.go
9.97
KB
-rw-r--r--
select6.go
783
B
-rw-r--r--
select7.go
932
B
-rw-r--r--
select8.go
826
B
-rw-r--r--
sendstmt.go
672
B
-rw-r--r--
sieve1.go
1.49
KB
-rw-r--r--
sieve2.go
3.88
KB
-rw-r--r--
zerosize.go
349
B
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : doubleselect.go
// run // Copyright 2009 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. // Test the situation in which two cases of a select can // both end up running. See http://codereview.appspot.com/180068. package main import ( "flag" "runtime" ) var iterations *int = flag.Int("n", 100000, "number of iterations") // sender sends a counter to one of four different channels. If two // cases both end up running in the same iteration, the same value will be sent // to two different channels. func sender(n int, c1, c2, c3, c4 chan<- int) { defer close(c1) defer close(c2) defer close(c3) defer close(c4) for i := 0; i < n; i++ { select { case c1 <- i: case c2 <- i: case c3 <- i: case c4 <- i: } } } // mux receives the values from sender and forwards them onto another channel. // It would be simpler to just have sender's four cases all be the same // channel, but this doesn't actually trigger the bug. func mux(out chan<- int, in <-chan int, done chan<- bool) { for v := range in { out <- v } done <- true } // recver gets a steam of values from the four mux's and checks for duplicates. func recver(in <-chan int) { seen := make(map[int]bool) for v := range in { if _, ok := seen[v]; ok { println("got duplicate value: ", v) panic("fail") } seen[v] = true } } func main() { runtime.GOMAXPROCS(2) flag.Parse() c1 := make(chan int) c2 := make(chan int) c3 := make(chan int) c4 := make(chan int) done := make(chan bool) cmux := make(chan int) go sender(*iterations, c1, c2, c3, c4) go mux(cmux, c1, done) go mux(cmux, c2, done) go mux(cmux, c3, done) go mux(cmux, c4, done) go func() { <-done <-done <-done <-done close(cmux) }() // We keep the recver because it might catch more bugs in the future. // However, the result of the bug linked to at the top is that we'll // end up panicking with: "throw: bad g->status in ready". recver(cmux) }
Close