diff --git a/src/runtime/defs_darwin_386.go b/src/runtime/defs_darwin_386.go index cf4812f9fab..e051301207d 100644 --- a/src/runtime/defs_darwin_386.go +++ b/src/runtime/defs_darwin_386.go @@ -174,7 +174,7 @@ type siginfo struct { si_pid int32 si_uid uint32 si_status int32 - si_addr *byte + si_addr uint32 si_value [4]byte si_band int32 __pad [7]uint32 diff --git a/src/runtime/defs_darwin_amd64.go b/src/runtime/defs_darwin_amd64.go index 2cd4c0cd057..d9d9fc55166 100644 --- a/src/runtime/defs_darwin_amd64.go +++ b/src/runtime/defs_darwin_amd64.go @@ -175,7 +175,7 @@ type siginfo struct { si_pid int32 si_uid uint32 si_status int32 - si_addr *byte + si_addr uint64 si_value [8]byte si_band int64 __pad [7]uint64 diff --git a/src/runtime/defs_darwin_arm.go b/src/runtime/defs_darwin_arm.go index 92bab509fb1..b53336c1b46 100644 --- a/src/runtime/defs_darwin_arm.go +++ b/src/runtime/defs_darwin_arm.go @@ -176,7 +176,7 @@ type siginfo struct { si_pid int32 si_uid uint32 si_status int32 - si_addr *byte + si_addr uint32 si_value [4]byte si_band int32 __pad [7]uint32 diff --git a/src/runtime/signal_darwin_386.go b/src/runtime/signal_darwin_386.go index ccf30ef3160..302b3aafc9d 100644 --- a/src/runtime/signal_darwin_386.go +++ b/src/runtime/signal_darwin_386.go @@ -26,9 +26,9 @@ func (c *sigctxt) cs() uint32 { return c.regs().cs } func (c *sigctxt) fs() uint32 { return c.regs().fs } func (c *sigctxt) gs() uint32 { return c.regs().gs } func (c *sigctxt) sigcode() uint32 { return uint32(c.info.si_code) } -func (c *sigctxt) sigaddr() uint32 { return uint32(uintptr(unsafe.Pointer(c.info.si_addr))) } +func (c *sigctxt) sigaddr() uint32 { return c.info.si_addr } func (c *sigctxt) set_eip(x uint32) { c.regs().eip = x } func (c *sigctxt) set_esp(x uint32) { c.regs().esp = x } func (c *sigctxt) set_sigcode(x uint32) { c.info.si_code = int32(x) } -func (c *sigctxt) set_sigaddr(x uint32) { c.info.si_addr = (*byte)(unsafe.Pointer(uintptr(x))) } +func (c *sigctxt) set_sigaddr(x uint32) { c.info.si_addr = x } diff --git a/src/runtime/signal_darwin_amd64.go b/src/runtime/signal_darwin_amd64.go index 409bc6d5752..dbf044814ce 100644 --- a/src/runtime/signal_darwin_amd64.go +++ b/src/runtime/signal_darwin_amd64.go @@ -34,9 +34,9 @@ func (c *sigctxt) cs() uint64 { return c.regs().cs } func (c *sigctxt) fs() uint64 { return c.regs().fs } func (c *sigctxt) gs() uint64 { return c.regs().gs } func (c *sigctxt) sigcode() uint64 { return uint64(c.info.si_code) } -func (c *sigctxt) sigaddr() uint64 { return uint64(uintptr(unsafe.Pointer(c.info.si_addr))) } +func (c *sigctxt) sigaddr() uint64 { return c.info.si_addr } func (c *sigctxt) set_rip(x uint64) { c.regs().rip = x } func (c *sigctxt) set_rsp(x uint64) { c.regs().rsp = x } func (c *sigctxt) set_sigcode(x uint64) { c.info.si_code = int32(x) } -func (c *sigctxt) set_sigaddr(x uint64) { c.info.si_addr = (*byte)(unsafe.Pointer(uintptr(x))) } +func (c *sigctxt) set_sigaddr(x uint64) { c.info.si_addr = x } diff --git a/src/runtime/signal_darwin_arm.go b/src/runtime/signal_darwin_arm.go index 1441a655ef6..0f109719315 100644 --- a/src/runtime/signal_darwin_arm.go +++ b/src/runtime/signal_darwin_arm.go @@ -29,7 +29,7 @@ func (c *sigctxt) sp() uint32 { return c.regs().sp } func (c *sigctxt) lr() uint32 { return c.regs().lr } func (c *sigctxt) pc() uint32 { return c.regs().pc } func (c *sigctxt) cpsr() uint32 { return c.regs().cpsr } -func (c *sigctxt) fault() uint32 { return uint32(uintptr(unsafe.Pointer(c.info.si_addr))) } +func (c *sigctxt) fault() uint32 { return c.info.si_addr } func (c *sigctxt) sigcode() uint32 { return uint32(c.info.si_code) } func (c *sigctxt) trap() uint32 { return 0 } func (c *sigctxt) error() uint32 { return 0 } @@ -41,4 +41,4 @@ func (c *sigctxt) set_lr(x uint32) { c.regs().lr = x } func (c *sigctxt) set_r10(x uint32) { c.regs().r[10] = x } func (c *sigctxt) set_sigcode(x uint32) { c.info.si_code = int32(x) } -func (c *sigctxt) set_sigaddr(x uint32) { c.info.si_addr = (*byte)(unsafe.Pointer(uintptr(x))) } +func (c *sigctxt) set_sigaddr(x uint32) { c.info.si_addr = x }