timmyb32r commented on code in PR #11932:
URL: https://github.com/apache/arrow-rs/pull/11932#discussion_r4602099785


##########
arrow-schema/src/ffi.rs:
##########
@@ -940,7 +956,33 @@ impl TryFrom<Schema> for FFI_ArrowSchema {
 mod tests {
     use super::*;
     use crate::Fields;
-    use std::sync::atomic::{AtomicBool, Ordering};
+    use std::alloc::{GlobalAlloc, Layout, System};
+    use std::ptr;
+    use std::sync::atomic::{AtomicBool, AtomicPtr, AtomicUsize, Ordering};
+
+    struct NameTrackingAllocator;
+
+    static TRACKED_NAME: AtomicPtr<u8> = AtomicPtr::new(ptr::null_mut());
+    static RELEASED_NAMES: AtomicUsize = AtomicUsize::new(0);
+
+    #[global_allocator]

Review Comment:
   Addressed, thanks! The global allocator was unnecessarily intrusive. I've 
removed it, and the regression test now relies on Miri's leak detection. I 
verified that it detects the leak before the fix and passes with the fix.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to