Index: compiler-rt/trunk/lib/sanitizer_common/sanitizer_procmaps_solaris.cc =================================================================== --- compiler-rt/trunk/lib/sanitizer_common/sanitizer_procmaps_solaris.cc +++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_procmaps_solaris.cc @@ -50,9 +50,11 @@ segment->protection |= kProtectionExecute; if (segment->filename != NULL && segment->filename_size > 0) { - internal_snprintf(segment->filename, - Min(segment->filename_size, (uptr)PATH_MAX), "%s", + char proc_path[PATH_MAX + 1]; + + internal_snprintf(proc_path, sizeof(proc_path), "/proc/self/path/%s", xmapentry->pr_mapname); + internal_readlink(proc_path, segment->filename, segment->filename_size); } data_.current += sizeof(prxmap_t);