From 7f39444852308224240ebfb75e0bf8f39403afa0 Mon Sep 17 00:00:00 2001 From: Nick Alcock Date: Mon, 20 Mar 2023 11:48:51 +0000 Subject: [PATCH] uring: always pair io_uring_get_probe_ring and io_uring_free_probe As of liburing 2.4-to-be, liburing has ceased using malloc for its probe allocations: it's concealed behind layers of confusing macros, but io_uring_get_probe_ring() doesn't actually use libc's malloc but ratehr its own __uring_alloc/__uring_free functions. So it no longer works to free() the return value of io_uring_get_probe_ring(): you have to use io_uring_free_probe() instead. I am going to report this to liburing upstream as a possible bug, but it is easy to work around in plocate in any case. --- io_uring_engine.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/io_uring_engine.cpp b/io_uring_engine.cpp index 63a3af7..be93660 100644 --- a/io_uring_engine.cpp +++ b/io_uring_engine.cpp @@ -41,7 +41,7 @@ IOUringEngine::IOUringEngine(size_t slop_bytes) if (!supports_stat) { dprintf("io_uring on this kernel does not support statx(); will do synchronous access checking.\n"); } - free(probe); + io_uring_free_probe(probe); } #endif } -- 2.39.2