When valgrind observes a mapping of a memfd_create anonymous file it
would generate a warning:
WARNING: Serious error when reading debug info
When reading debug info from /memfd:mozilla-ipc (deleted):
failed to stat64/stat this file
All such memfd_create anonymous files are always prefixed with
"memfd:" and obviously cannot be stat64/stat. So ignore such warnings.
Tested-by: ishikawa@yk.rim.or.jp
if (sr_isError(statres)) {
DebugInfo fake_di;
Bool quiet = VG_(strstr)(filename, "/var/run/nscd/") != NULL
- || VG_(strstr)(filename, "/dev/shm/") != NULL;
+ || VG_(strstr)(filename, "/dev/shm/") != NULL
+ || VG_(strncmp)("/memfd:", filename,
+ VG_(strlen)("/memfd:")) == 0;
if (!quiet && VG_(clo_verbosity) > 1) {
VG_(memset)(&fake_di, 0, sizeof(fake_di));
fake_di.fsm.filename = ML_(dinfo_strdup)("di.debuginfo.nmm", filename);