diff options
Diffstat (limited to 'tools/test')
| -rw-r--r-- | tools/test/cuda_drv_test2.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/test/cuda_drv_test2.c b/tools/test/cuda_drv_test2.c index cfe21d8..d4f848a 100644 --- a/tools/test/cuda_drv_test2.c +++ b/tools/test/cuda_drv_test2.c @@ -87,6 +87,13 @@ static void scan_self_for_payload(const char *tag) perms, off, path); if (perms[0] != 'r' || b <= a || b - a > (512ULL << 20)) continue; + /* + * Only scan anonymous and device mappings: reading a truncated + * file-backed mapping past EOF raises SIGBUS and killed the client + * silently before cuMemcpyDtoH. + */ + if (path[0] && path[0] != '[' && strncmp(path, "/dev/", 5)) + continue; { volatile unsigned long long *p; for (p = (volatile unsigned long long *)a; |
