liburing/0001-test-init-mem-zero-the-ringbuf-memory.patch
David Disseldorp 7f72b46110 - switch URLs to the current location on github
- Update to 2.8
  * Add support for incrementally/partially consumed provided buffers,
    usable with the provided buffer ring support.
  * Add support for foo_and_wait_min_timeout(), where it's possible to
    define a minimum timeout for waiting to get batches of completions,
    but if that fails, extend for a longer timeout without having any
    extra context switches.
  * Add support for using different clock sources for completion waiting.
  * Great increase coverage of test cases, test case improvements and
    fixes.
  * Don't leak _GNU_SOURCE via pkb-config --cflags
  * Support for address sanitizer
  * Add examples/kdigest sample program
  * Add discard helper, test, and man page
  * Man page updates
  * Sync with kernel 6.10
          * send/recv bundle support
          * accept nowait and CQE_F_MORE
  * Add and update test cases
  * Fix io_uring_queue_init_mem() returning a value that was too small,
    potentially causing memory corruption in userspace by overwriting
    64 bytes beyond the returned value. Also add test case for that.
  * Add 64-bit length variants of io_uring_prep_{m,f}advise()
  * Add BIND/LISTEN support and helpers / man pages
  * Add io_uring_enable_rings.3 man page
  * Fix bug in io_uring_prep_read_multishot()
  * Fixup bundle test cases
  * Add fixed-hugepage test case
  * Fix io_uring_prep_fixed_fd_install.3 man page

OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/liburing?expand=0&rev=50
2024-12-05 23:32:43 +00:00

36 lines
977 B
Diff

From: "Jiri Slaby (SUSE)" <jirislaby@kernel.org>
Date: Wed, 4 Dec 2024 13:05:15 +0100
Subject: test/init-mem: zero the ringbuf memory
References: fix-test-crash
Patch-mainline: Submitted, #1293
This is a similar fix to commit 8100d7b5f862 (test/buf-ring-nommap: zero
the ringbuf memory). The same is needed for test/init-mem as it crashes
with MALLOC_PERTURB_=69 too.
So zero the ringbuf memory after posix_memalign() too.
Fixes #1291.
Signed-off-by: Jiri Slaby (SUSE) <jirislaby@kernel.org>
---
test/init-mem.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/test/init-mem.c b/test/init-mem.c
index 59973c8b7521..8b139fedd83b 100644
--- a/test/init-mem.c
+++ b/test/init-mem.c
@@ -41,6 +41,8 @@ static int setup_ctx(struct ctx *ctx, struct q_entries *q)
if (posix_memalign(&ctx->mem, 4096, 2*1024*1024))
return T_EXIT_FAIL;
+ memset(ctx->mem, 0, 2*1024*1024);
+
ctx->pre = ctx->mem + 4096 - sizeof(unsigned long long);
*ctx->pre = PRE_RED;
--
2.47.1