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 /
internal /
poll /
[ HOME SHELL ]
Name
Size
Permission
Action
errno_unix.go
738
B
-rw-r--r--
errno_windows.go
724
B
-rw-r--r--
error_linux_test.go
748
B
-rw-r--r--
error_stub_test.go
412
B
-rw-r--r--
error_test.go
1.04
KB
-rw-r--r--
export_posix_test.go
481
B
-rw-r--r--
export_test.go
708
B
-rw-r--r--
export_windows_test.go
431
B
-rw-r--r--
fcntl_js.go
325
B
-rw-r--r--
fcntl_libc.go
365
B
-rw-r--r--
fcntl_syscall.go
484
B
-rw-r--r--
fd.go
2.1
KB
-rw-r--r--
fd_fsync_darwin.go
535
B
-rw-r--r--
fd_fsync_posix.go
428
B
-rw-r--r--
fd_fsync_windows.go
358
B
-rw-r--r--
fd_io_plan9.go
2.1
KB
-rw-r--r--
fd_mutex.go
6.42
KB
-rw-r--r--
fd_mutex_test.go
3.88
KB
-rw-r--r--
fd_opendir_darwin.go
847
B
-rw-r--r--
fd_plan9.go
4.97
KB
-rw-r--r--
fd_poll_js.go
2.27
KB
-rw-r--r--
fd_poll_runtime.go
3.74
KB
-rw-r--r--
fd_posix.go
1.05
KB
-rw-r--r--
fd_posix_test.go
1.27
KB
-rw-r--r--
fd_unix.go
13.51
KB
-rw-r--r--
fd_windows.go
28.75
KB
-rw-r--r--
fd_windows_test.go
2.25
KB
-rw-r--r--
fd_writev_darwin.go
388
B
-rw-r--r--
fd_writev_unix.go
502
B
-rw-r--r--
hook_cloexec.go
371
B
-rw-r--r--
hook_unix.go
481
B
-rw-r--r--
hook_windows.go
668
B
-rw-r--r--
read_test.go
1.07
KB
-rw-r--r--
sendfile_bsd.go
1.17
KB
-rw-r--r--
sendfile_linux.go
1.1
KB
-rw-r--r--
sendfile_solaris.go
1.46
KB
-rw-r--r--
sendfile_windows.go
2.01
KB
-rw-r--r--
sock_cloexec.go
1.76
KB
-rw-r--r--
sockopt.go
1.08
KB
-rw-r--r--
sockopt_linux.go
490
B
-rw-r--r--
sockopt_unix.go
532
B
-rw-r--r--
sockopt_windows.go
862
B
-rw-r--r--
sockoptip.go
866
B
-rw-r--r--
splice_linux.go
5.66
KB
-rw-r--r--
strconv.go
946
B
-rw-r--r--
sys_cloexec.go
1.1
KB
-rw-r--r--
writev.go
1.76
KB
-rw-r--r--
writev_test.go
1.31
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : fd_mutex_test.go
// Copyright 2013 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 poll_test import ( . "internal/poll" "math/rand" "runtime" "strings" "testing" "time" ) func TestMutexLock(t *testing.T) { var mu FDMutex if !mu.Incref() { t.Fatal("broken") } if mu.Decref() { t.Fatal("broken") } if !mu.RWLock(true) { t.Fatal("broken") } if mu.RWUnlock(true) { t.Fatal("broken") } if !mu.RWLock(false) { t.Fatal("broken") } if mu.RWUnlock(false) { t.Fatal("broken") } } func TestMutexClose(t *testing.T) { var mu FDMutex if !mu.IncrefAndClose() { t.Fatal("broken") } if mu.Incref() { t.Fatal("broken") } if mu.RWLock(true) { t.Fatal("broken") } if mu.RWLock(false) { t.Fatal("broken") } if mu.IncrefAndClose() { t.Fatal("broken") } } func TestMutexCloseUnblock(t *testing.T) { c := make(chan bool) var mu FDMutex mu.RWLock(true) for i := 0; i < 4; i++ { go func() { if mu.RWLock(true) { t.Error("broken") return } c <- true }() } // Concurrent goroutines must not be able to read lock the mutex. time.Sleep(time.Millisecond) select { case <-c: t.Fatal("broken") default: } mu.IncrefAndClose() // Must unblock the readers. for i := 0; i < 4; i++ { select { case <-c: case <-time.After(10 * time.Second): t.Fatal("broken") } } if mu.Decref() { t.Fatal("broken") } if !mu.RWUnlock(true) { t.Fatal("broken") } } func TestMutexPanic(t *testing.T) { ensurePanics := func(f func()) { defer func() { if recover() == nil { t.Fatal("does not panic") } }() f() } var mu FDMutex ensurePanics(func() { mu.Decref() }) ensurePanics(func() { mu.RWUnlock(true) }) ensurePanics(func() { mu.RWUnlock(false) }) ensurePanics(func() { mu.Incref(); mu.Decref(); mu.Decref() }) ensurePanics(func() { mu.RWLock(true); mu.RWUnlock(true); mu.RWUnlock(true) }) ensurePanics(func() { mu.RWLock(false); mu.RWUnlock(false); mu.RWUnlock(false) }) // ensure that it's still not broken mu.Incref() mu.Decref() mu.RWLock(true) mu.RWUnlock(true) mu.RWLock(false) mu.RWUnlock(false) } func TestMutexOverflowPanic(t *testing.T) { defer func() { r := recover() if r == nil { t.Fatal("did not panic") } msg, ok := r.(string) if !ok { t.Fatalf("unexpected panic type %T", r) } if !strings.Contains(msg, "too many") || strings.Contains(msg, "inconsistent") { t.Fatalf("wrong panic message %q", msg) } }() var mu1 FDMutex for i := 0; i < 1<<21; i++ { mu1.Incref() } } func TestMutexStress(t *testing.T) { P := 8 N := int(1e6) if testing.Short() { P = 4 N = 1e4 } defer runtime.GOMAXPROCS(runtime.GOMAXPROCS(P)) done := make(chan bool) var mu FDMutex var readState [2]uint64 var writeState [2]uint64 for p := 0; p < P; p++ { go func() { r := rand.New(rand.NewSource(rand.Int63())) for i := 0; i < N; i++ { switch r.Intn(3) { case 0: if !mu.Incref() { t.Error("broken") return } if mu.Decref() { t.Error("broken") return } case 1: if !mu.RWLock(true) { t.Error("broken") return } // Ensure that it provides mutual exclusion for readers. if readState[0] != readState[1] { t.Error("broken") return } readState[0]++ readState[1]++ if mu.RWUnlock(true) { t.Error("broken") return } case 2: if !mu.RWLock(false) { t.Error("broken") return } // Ensure that it provides mutual exclusion for writers. if writeState[0] != writeState[1] { t.Error("broken") return } writeState[0]++ writeState[1]++ if mu.RWUnlock(false) { t.Error("broken") return } } } done <- true }() } for p := 0; p < P; p++ { <-done } if !mu.IncrefAndClose() { t.Fatal("broken") } if !mu.Decref() { t.Fatal("broken") } }
Close