1
0
mirror of https://github.com/golang/go synced 2024-09-30 22:08:32 -06:00

runtime: use unified method signature for *sigctxt.fault

Currently, *sigctxt.fault of freebsd-arm64 and openbsd-arm64 return
uint64 which is different from other arches (return uintptr). Change
the method signature for consistency.
This commit is contained in:
Jes Cok 2023-09-16 07:47:31 +08:00
parent 561a507905
commit 82934ecd3d
2 changed files with 2 additions and 2 deletions

View File

@ -52,7 +52,7 @@ func (c *sigctxt) sp() uint64 { return c.regs().mc_gpregs.gp_sp }
//go:nowritebarrierrec
func (c *sigctxt) pc() uint64 { return c.regs().mc_gpregs.gp_elr }
func (c *sigctxt) fault() uint64 { return c.info.si_addr }
func (c *sigctxt) fault() uintptr { return uintptr(c.info.si_addr) }
func (c *sigctxt) sigcode() uint64 { return uint64(c.info.si_code) }
func (c *sigctxt) sigaddr() uint64 { return c.info.si_addr }

View File

@ -54,7 +54,7 @@ func (c *sigctxt) sp() uint64 { return (uint64)(c.regs().sc_sp) }
//go:nowritebarrierrec
func (c *sigctxt) rip() uint64 { return (uint64)(c.regs().sc_lr) } /* XXX */
func (c *sigctxt) fault() uint64 { return c.sigaddr() }
func (c *sigctxt) fault() uintptr { return uintptr(c.sigaddr()) }
func (c *sigctxt) sigcode() uint64 { return uint64(c.info.si_code) }
func (c *sigctxt) sigaddr() uint64 {
return *(*uint64)(add(unsafe.Pointer(c.info), 16))