on-internet
← Community

Valgrind trying to read user files for debug information

Stack Overflow ·

I'm running code that mmap() a file using Valgrind, and it is giving me an error: --23254-- WARNING: Serious error when reading debug info --23254-- When reading debug info from /tmp/db/test.txt: --23254-- can't read file to inspect ELF header The code in question is about as simple as you can get it to be: #define _GNU_SOURCE /* See feature_test_macros(7) */ #include <fcntl.h> #include <stdio.h> #include <sys/types.h> #include <sys/stat.h> #include <unistd.h> #include <fcntl.h> #include <sys/mman.h> int main() { int fd = open("test.txt", O_RDWR|O_CREAT|O_TRUNC|O_DSYNC|O_DIRECT|O_CLOEXEC, S_IR

Comments

Sign in or sign up to comment and upvote.

No comments yet.