https://bugs.kde.org/show_bug.cgi?id=508328
Bug ID: 508328
Summary: Memory allegedly uninitialized after
ioctl(PROCMAP_QUERY)
Classification: Developer tools
Product: valgrind
Version First 3.25.0
Reported In:
Platform: Other
OS: Linux
Status: REPORTED
Severity: normal
Priority: NOR
Component: memcheck
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: ---
#include <stdio.h>
#include <stdint.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <linux/fs.h>
int main(int argc, char** argv)
{
char name[256];
struct procmap_query pq = {
.size = sizeof(pq), .query_addr = (uintptr_t)main,
.vma_name_size = 256, .vma_name_addr = (uintptr_t)name
};
int fd = open("/proc/self/maps", O_RDONLY);
ioctl(fd, PROCMAP_QUERY, &pq);
puts(name);
}
Install Linux >= 6.11, then compile and run the above. No particular flags
needed, gcc's and valgrind's defaults are fine.
Expected: Print the usual Valgrind header/footer, and the path of the
executable.
Actual: Also prints various warnings about the name variable being
uninitialized.
Discovered on Debian stable (3.24), also reproduces on 3.25.1. Probably needs
something similar to bug 333817.
--
You are receiving this mail because:
You are watching all bug changes.