candiduslynx commented on code in PR #35970:
URL: https://github.com/apache/arrow/pull/35970#discussion_r1221846982


##########
go/arrow/memory/checked_allocator.go:
##########
@@ -160,14 +160,24 @@ func (a *CheckedAllocator) AssertSize(t TestingT, sz int) 
{
                                break
                        }
                        callersMsg.WriteString("\t")
-                       callersMsg.WriteString(frame.Function)
-                       callersMsg.WriteString(fmt.Sprintf(" line %d", 
frame.Line))
+                       if fn := frame.Func; fn != nil {
+                               callersMsg.WriteString(fmt.Sprintf("%s+%x", 
fn.Name(), frame.PC-fn.Entry()))
+                       } else {
+                               callersMsg.WriteString(fmt.Sprintf("%s, line 
%d", frame.Function, frame.Line))
+                       }
+                       callersMsg.WriteString("\n\t\t")
+                       callersMsg.WriteString(frame.File + ":" + 
strconv.Itoa(frame.Line))

Review Comment:
   this gives a proper fill filename, so the leak is easier to find (IntelliJ 
IDEA even allows clicking on a link to line)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscr...@arrow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to