3 Commits
Author SHA1 Message Date
Nuno Cruces c892bb7ec2 unix: fix MmapPtr test failing on OpenBSD
OpenBSD apparently doesn't allow unmapping address space if part of the region is already unmapped.
This tweaks the test so that munmapping twice no longer happens.

Fixes golang/go#68181

Change-Id: I588255f5e10ec015dbb7188eac79cee6be570680
GitHub-Last-Rev: 2535abd892d9063b9bdda69101a45f71c4174124
GitHub-Pull-Request: golang/sys#199
Cq-Include-Trybots: luci.golang.try:go1.22-openbsd-amd64
Reviewed-on: https://go-review.googlesource.com/c/sys/+/595095
TryBot-Bypass: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@golang.org>
2024-06-26 17:48:03 +00:00
Nuno Cruces a0ef40af1f unix: fix MremapPtr test failing on NetBSD
NetBSD apparently doesn't allow remapping into used address space.
This means that the test that uses mremap to move a mmapped page
into a new address should first mmap (to reserve)
then munmap (to free) the destination.

Fixes golang/go#68180

Change-Id: If66b67e7166ca4dc4331a8cfc3e3a285416e9849
GitHub-Last-Rev: 92058c2f2525be77522762d503ac7193580f125e
GitHub-Pull-Request: golang/sys#198
Cq-Include-Trybots: luci.golang.try:x_sys-gotip-netbsd-amd64
Reviewed-on: https://go-review.googlesource.com/c/sys/+/594756
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Joedian Reid <joedian@google.com>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2024-06-26 14:54:58 +00:00
Nuno Cruces daa239428c unix: add unsafe mmap, munmap, mremap
Fixes golang/go#56123

Change-Id: I63a7a6fb3a5b1bb556ac19d76a1e0b04a03ebcfa
GitHub-Last-Rev: 39dbc8e308807bd07863b6f5a49bcdcf506bc0e7
GitHub-Pull-Request: golang/sys#197
Reviewed-on: https://go-review.googlesource.com/c/sys/+/592415
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
2024-06-25 00:37:56 +00:00