Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 189 for unprotect (0.12 sec)

  1. src/cmd/go/internal/modindex/read.go

    		return pkg, nil
    	})
    }
    
    var errCorrupt = errors.New("corrupt index")
    
    // protect marks the start of a large section of code that accesses the index.
    // It should be used as:
    //
    //	defer unprotect(protect, &err)
    //
    // It should not be used for trivial accesses which would be
    // dwarfed by the overhead of the defer.
    func protect() bool {
    	return debug.SetPanicOnFault(true)
    }
    
    var isTest = false
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 16 14:34:32 UTC 2024
    - 29.7K bytes
    - Viewed (0)
  2. src/runtime/mem_aix.go

    	// So, call mprotect to change permissions.
    	// Note that sysMap is always called with a non-nil pointer
    	// since it transitions a Reserved memory region to Prepared,
    	// so mprotect is always possible.
    	_, err := mprotect(v, n, _PROT_READ|_PROT_WRITE)
    	if err == _ENOMEM {
    		throw("runtime: out of memory")
    	}
    	if err != 0 {
    		print("runtime: mprotect(", v, ", ", n, ") returned ", err, "\n")
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Aug 22 19:05:10 UTC 2023
    - 2K bytes
    - Viewed (0)
  3. src/runtime/race/race_darwin_amd64.go

    //go:cgo_import_dynamic malloc_zones malloc_zones ""
    //go:cgo_import_dynamic memcpy memcpy ""
    //go:cgo_import_dynamic memset_pattern16 memset_pattern16 ""
    //go:cgo_import_dynamic mkdir mkdir ""
    //go:cgo_import_dynamic mprotect mprotect ""
    //go:cgo_import_dynamic open open ""
    //go:cgo_import_dynamic pipe pipe ""
    //go:cgo_import_dynamic posix_openpt posix_openpt ""
    //go:cgo_import_dynamic posix_spawn posix_spawn ""
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Nov 16 19:29:22 UTC 2023
    - 5.6K bytes
    - Viewed (0)
  4. src/runtime/race/race_darwin_arm64.go

    //go:cgo_import_dynamic malloc_zones malloc_zones ""
    //go:cgo_import_dynamic memcpy memcpy ""
    //go:cgo_import_dynamic memset_pattern16 memset_pattern16 ""
    //go:cgo_import_dynamic mkdir mkdir ""
    //go:cgo_import_dynamic mprotect mprotect ""
    //go:cgo_import_dynamic open open ""
    //go:cgo_import_dynamic pipe pipe ""
    //go:cgo_import_dynamic posix_openpt posix_openpt ""
    //go:cgo_import_dynamic posix_spawn posix_spawn ""
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Nov 16 19:29:22 UTC 2023
    - 5.6K bytes
    - Viewed (0)
  5. src/runtime/race/race_linux_test.go

    	if err != nil {
    		t.Fatalf("mmap failed %s", err)
    	}
    	defer syscall.Munmap(b)
    	err = syscall.Mprotect(b[pagesize:], syscall.PROT_NONE)
    	if err != nil {
    		t.Fatalf("mprotect high failed %s\n", err)
    	}
    
    	// This should not fault.
    	a := (*uint32)(unsafe.Pointer(&b[pagesize-4]))
    	atomic.StoreUint32(a, 1)
    	if x := atomic.LoadUint32(a); x != 1 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 16 14:09:02 UTC 2023
    - 1.9K bytes
    - Viewed (0)
  6. src/crypto/sha1/issue15617_test.go

    	const pageSize = 4 << 10
    	data, err := syscall.Mmap(0, 0, 2*pageSize, syscall.PROT_READ|syscall.PROT_WRITE, syscall.MAP_ANON|syscall.MAP_PRIVATE)
    	if err != nil {
    		panic(err)
    	}
    	if err := syscall.Mprotect(data[pageSize:], syscall.PROT_NONE); err != nil {
    		panic(err)
    	}
    	for i := 0; i < pageSize; i++ {
    		sha1.Sum(data[pageSize-i : pageSize])
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Sep 14 14:17:04 UTC 2022
    - 660 bytes
    - Viewed (0)
  7. test/recover4.go

    	// could create a mapping that ends up in this hole otherwise,
    	// invalidating the test.
    	hole := data[len(data)/2 : 3*(len(data)/4)]
    	if err := syscall.Mprotect(hole, syscall.PROT_NONE); err != nil {
    		log.Fatalf("mprotect: %v", err)
    	}
    
    	// Check that memcopy returns the actual amount copied
    	// before the fault.
    	const offset = 5
    	n, err := memcopy(data[offset:], make([]byte, len(data)))
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 23:33:25 UTC 2023
    - 2.2K bytes
    - Viewed (0)
  8. src/internal/syscall/windows/memory_windows.go

    	RegionSize uintptr
    	// The state of the pages in the region.
    	State uint32
    	// The access protection of the pages in the region.
    	Protect uint32
    	// The type of pages in the region.
    	Type uint32
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat Aug 20 00:18:04 UTC 2022
    - 940 bytes
    - Viewed (0)
  9. staging/src/k8s.io/apiserver/pkg/storage/cacher/ready.go

    	state       status        // represent the state of the variable
    	generation  int           // represent the number of times we have transtioned to ready
    	lock        sync.RWMutex  // protect the state and generation variables
    	restartLock sync.Mutex    // protect the transition from ready to pending where the channel is recreated
    	waitCh      chan struct{} // blocks until is ready or stopped
    }
    
    func newReady() *ready {
    	return &ready{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Mar 16 13:32:11 UTC 2023
    - 4.1K bytes
    - Viewed (0)
  10. internal/dsync/utils.go

    package dsync
    
    import (
    	"math/rand"
    	"time"
    )
    
    func backoffWait(min, unit, cap time.Duration) func(*rand.Rand, uint) time.Duration {
    	if unit > time.Hour {
    		// Protect against integer overflow
    		panic("unit cannot exceed one hour")
    	}
    	return func(r *rand.Rand, attempt uint) time.Duration {
    		sleep := min
    		sleep += unit * time.Duration(attempt)
    		if sleep > cap {
    			sleep = cap
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Sat May 13 15:42:21 UTC 2023
    - 1.2K bytes
    - Viewed (0)
Back to top