mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-16 18:53:29 +00:00
syscall: fix array size for mmap slice creation
This commit is contained in:
@@ -85,7 +85,7 @@ func Mmap(fd int, offset int64, length int, prot int, flags int) (data []byte, e
|
|||||||
if addr == unsafe.Pointer(^uintptr(0)) {
|
if addr == unsafe.Pointer(^uintptr(0)) {
|
||||||
return nil, getErrno()
|
return nil, getErrno()
|
||||||
}
|
}
|
||||||
return (*[30]byte)(addr)[:length], nil
|
return (*[1 << 30]byte)(addr)[:length:length], nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func Mprotect(b []byte, prot int) (err error) {
|
func Mprotect(b []byte, prot int) (err error) {
|
||||||
|
|||||||
Reference in New Issue
Block a user