forked from rosa/hakurei
@@ -212,11 +212,10 @@ func (r *Report) HandleAccess(errP *error) func() {
|
||||
*errP = err
|
||||
}
|
||||
|
||||
var runtimeError interface {
|
||||
if runtimeError, ok := errors.AsType[interface {
|
||||
Addr() uintptr
|
||||
runtime.Error
|
||||
}
|
||||
if errors.As(*errP, &runtimeError) {
|
||||
}](*errP); ok {
|
||||
offset := int(runtimeError.Addr() - uintptr(unsafe.Pointer(unsafe.SliceData(r.data))))
|
||||
// best effort for fragile uintptr
|
||||
if offset >= 0 {
|
||||
|
||||
Reference in New Issue
Block a user