Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[sanitizer_common] Several Solaris procmaps fixes
Since the introduction of GoogleTest sharding in D122251 <https://reviews.llvm.org/D122251>, some of the Solaris sanitizer tests have been running extremly long (up to an hour) while they took mere seconds before. Initial investigation suggests that massive lock contention in Solaris procfs is involved here. However, there's an easy way to somewhat reduce the impact: while the current `ReadProcMaps` uses `ReadFileToBuffer` to read `/proc/self/xmap`, that function primarily caters to Linux procfs reporting file sizes of 0 while the size on Solaris is accurate. This patch makes use of that, reducing the number of syscalls involved and reducing the runtime of affected tests by a factor of 4. Besides, it handles shared mappings and doesn't call `readlink` for unnamed map entries. Tested on `sparcv9-sun-solaris2.11` and `amd64-pc-solaris2.11`. Differential Revision: https://reviews.llvm.org/D129837
- Loading branch information