]> git.sesse.net Git - plocate/commit
uring: always pair io_uring_get_probe_ring and io_uring_free_probe
authorNick Alcock <nick.alcock@oracle.com>
Mon, 20 Mar 2023 11:48:51 +0000 (11:48 +0000)
committerSteinar H. Gunderson <steinar+git@gunderson.no>
Mon, 20 Mar 2023 12:09:02 +0000 (13:09 +0100)
commit7f39444852308224240ebfb75e0bf8f39403afa0
treeadde75e17b35448a42cb58ef7f3cedfc765357fc
parenta81eb2f2369de18d2376e266b36d2f32fff7600f
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