- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 9,265 for mprotect (0.13 sec)
-
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) -
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) -
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) -
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) -
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) -
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) -
src/runtime/testdata/testprogcgo/sigstack.go
SigStackCallback(); // Disable signal stack and protect it so we can detect reuse. if (ost.ss_flags & SS_DISABLE) { // Darwin libsystem has a bug where it checks ss_size // even if SS_DISABLE is set. (The kernel gets it right.) ost.ss_size = CSIGSTKSZ; } if (sigaltstack(&ost, NULL) < 0) { perror("sigaltstack restore failed"); abort(); } mprotect(base, CSIGSTKSZ, PROT_NONE); return NULL; }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Dec 13 18:45:54 UTC 2021 - 2.1K bytes - Viewed (0) -
test/fixedbugs/issue8606b.go
bad2 := "foo" p := syscall.Getpagesize() b, err := syscall.Mmap(-1, 0, p, syscall.PROT_READ|syscall.PROT_WRITE, syscall.MAP_ANON|syscall.MAP_PRIVATE) if err != nil { panic(err) } err = syscall.Mprotect(b, syscall.PROT_NONE) if err != nil { panic(err) } // write inaccessible pointers as the data fields of bad1 and bad2. (*reflect.StringHeader)(unsafe.Pointer(&bad1)).Data = uintptr(unsafe.Pointer(&b[0]))
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 19 23:33:25 UTC 2023 - 1.9K bytes - Viewed (0) -
test/fixedbugs/issue15002.go
b, err := syscall.Mmap(-1, 0, 2*p, syscall.PROT_READ|syscall.PROT_WRITE, syscall.MAP_ANON|syscall.MAP_PRIVATE) if err != nil { panic(err) } // Mark the second page as faulting. err = syscall.Mprotect(b[p:], syscall.PROT_NONE) if err != nil { panic(err) } // Get a slice pointing to the last byte of the good page. x := b[p-one : p] test16(x) test16i(x, 0) test32(x) test32i(x, 0)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 19 23:33:25 UTC 2023 - 3.2K bytes - Viewed (0) -
src/runtime/mem_linux.go
// which prevents us from allocating more stack. // //go:nosplit func sysFreeOS(v unsafe.Pointer, n uintptr) { munmap(v, n) } func sysFaultOS(v unsafe.Pointer, n uintptr) { mprotect(v, n, _PROT_NONE) madvise(v, n, _MADV_DONTNEED) } func sysReserveOS(v unsafe.Pointer, n uintptr) unsafe.Pointer { p, err := mmap(v, n, _PROT_NONE, _MAP_ANON|_MAP_PRIVATE, -1, 0) if err != 0 { return nil
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Mar 25 19:53:03 UTC 2024 - 5K bytes - Viewed (0)