Bug 508319 - io_uring reads are not recognized as initializing memory
Summary: io_uring reads are not recognized as initializing memory
Status: CONFIRMED
Alias: None
Product: valgrind
Classification: Developer tools
Component: memcheck (other bugs)
Version First Reported In: 3.25.0
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Paul Floyd
URL:
Keywords:
: 485400 (view as bug list)
Depends on:
Blocks:
 
Reported: 2025-08-16 02:12 UTC by Chris
Modified: 2025-09-01 09:26 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
C repro (339 bytes, text/plain)
2025-08-16 02:12 UTC, Chris
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Chris 2025-08-16 02:12:16 UTC
Created attachment 184127 [details]
C repro

SUMMARY
Reading into a buffer using io_uring and then subsequently accessing the buffer is a reported as an uninitialized read.

STEPS TO REPRODUCE
1. Compile the attached C code (depends on liburing).
2. Run `valgrind ./a.out`, and enter any input.
3. memcheck reports uninitialized bytes in the write syscall.

OBSERVED RESULT
==2777862== Syscall param write(buf) points to uninitialised byte(s)
==2777862==    at 0x4999574: write (write.c:26)
==2777862==    by 0x400173C: main (in /home/chris/test)
==2777862==  Address 0x1ffefffdbe is on thread 1's stack
==2777862==  in frame #1, created by main (???:)
==2777862== 

EXPECTED RESULT
No errors.

SOFTWARE/OS VERSIONS
Linux: 6.8.0 (Ubuntu 24.04)
Valgrind: 3.25.1
Comment 1 Paul Floyd 2025-09-01 09:25:25 UTC
In memcheck buf is all marked as uninitialised.

This looks like a duplicate of 485400. Even though this is newer I'm going to close the older one as a duplicate since this reproducer is much easier to work with.
Comment 2 Paul Floyd 2025-09-01 09:25:51 UTC
*** Bug 485400 has been marked as a duplicate of this bug. ***