aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/rosa/report.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/rosa/report.go')
-rw-r--r--internal/rosa/report.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/internal/rosa/report.go b/internal/rosa/report.go
index 54f60fb3..a97ff8e8 100644
--- a/internal/rosa/report.go
+++ b/internal/rosa/report.go
@@ -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 {