This is an archive of the discontinued LLVM Phabricator instance.

[Sanitizers] Fix SanitizerCommon-Unit :: ./Sanitizer-*-Test/MemoryMappingLayout.DumpListOfModules on Solaris
ClosedPublic

Authored by ro on Jul 11 2019, 5:13 AM.

Details

Summary

The MemoryMappingLayout.DumpListOfModules currently FAILs on Solaris:

[ RUN      ] MemoryMappingLayout.DumpListOfModules
/vol/llvm/src/compiler-rt/local/lib/sanitizer_common/tests/sanitizer_procmaps_test.cc:52: Failure
Value of: found
  Actual: false
Expected: true
[  FAILED  ] MemoryMappingLayout.DumpListOfModules (22 ms)

The problem is that the test expects the executable name from modules[i].full_name(),
however the pr_mapname field of struct prmap is just the entry in /proc/<pid>/object,
which is "a.out" instead of "Sanitizer-i386-Test ". Fortunately, the real name can
be determined by looking in proc/<pid>/path where "a.out" is a symlink to the
real path.

Tested on x86_64-pc-solaris2.11. Ok for trunk?

Diff Detail

Event Timeline

ro created this revision.Jul 11 2019, 5:13 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 11 2019, 5:13 AM
Herald added subscribers: Restricted Project, fedor.sergeev, kubamracek. · View Herald Transcript
eugenis accepted this revision.Jul 11 2019, 12:05 PM
eugenis added a subscriber: eugenis.

LGTM

This revision is now accepted and ready to land.Jul 11 2019, 12:05 PM
This revision was automatically updated to reflect the committed changes.