Adds names to anonymous GWP-ASan mappings. This helps Android with debugging
via. /proc/maps, as GWP-ASan-allocated mappings are now easily identifyable.
Details
- Reviewers
eugenis cferris - Commits
- rGe1440f594c14: [GWP-ASan] Add names to anonymous mappings.
Diff Detail
- Repository
- rG LLVM Github Monorepo
Unit Tests
Event Timeline
Unit tests: fail. 62146 tests passed, 5 failed and 811 were skipped.
failed: libc++.std/language_support/cmp/cmp_partialord/partialord.pass.cpp failed: libc++.std/language_support/cmp/cmp_strongeq/cmp.strongeq.pass.cpp failed: libc++.std/language_support/cmp/cmp_strongord/strongord.pass.cpp failed: libc++.std/language_support/cmp/cmp_weakeq/cmp.weakeq.pass.cpp failed: libc++.std/language_support/cmp/cmp_weakord/weakord.pass.cpp
clang-tidy: fail. clang-tidy found 3 errors and 5 warnings. 0 of them are added as review comments below (why?).
clang-format: pass.
Build artifacts: diff.json, clang-tidy.txt, clang-format.patch, CMakeCache.txt, console-log.txt, test-results.xml
Pre-merge checks is in beta. Report issue. Please join beta or enable it for your project.
How would you prefer I go about testing this? I can read from /proc/maps but only on Android (which IIRC GWP-ASan doesn't actually test on upstream, only downstream). FWIW - Scudo doesn't have tests for this either.
AFAIK we do test on android.
See http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-android/builds/27148/steps/run%20lit%20tests%20%5Baarch64%2Faosp_marlin-userdebug%2FPI%5D/logs/stdio - it lists a few scudo tests as unsupported, which means the rest of them have passed.
You can do something like test/sanitizer_common/TestCases/Linux/decorate_proc_maps.cpp
AFAIK we do test on android.
compiler-rt/cmake/config-ix.cmake:739
# Note: Fuchsia and Windows are not currently supported by GWP-ASan. Support # is planned for these platforms. Darwin is also not supported due to TLS # calling malloc on first use. # TODO(hctim): Enable this on Android again. Looks like it's causing a SIGSEGV # for Scudo and GWP-ASan, further testing needed. if (COMPILER_RT_HAS_SANITIZER_COMMON AND GWP_ASAN_SUPPORTED_ARCH AND OS_NAME MATCHES "Linux") # <----------------------------------------------------------------------------[here] set(COMPILER_RT_HAS_GWP_ASAN TRUE) else() set(COMPILER_RT_HAS_GWP_ASAN FALSE) endif() pythonize_bool(COMPILER_RT_HAS_GWP_ASAN)
I should probably address this TODO as well... It may actually be resolved with the fork() changes, but I can't remember what the exact problem is.
Hm, we should really fix that sometime soon.
In the mean time, I'm OK with this going in w/o tests, after all it's mainly a decorative change.
But please leave a TODO somewhere.
Unit tests: fail. 62191 tests passed, 1 failed and 815 were skipped.
failed: libc++.std/thread/thread_mutex/thread_mutex_requirements/thread_timedmutex_requirements/thread_timedmutex_class/lock.pass.cpp
clang-tidy: fail. clang-tidy found 3 errors and 5 warnings. 0 of them are added as review comments below (why?).
clang-format: pass.
Build artifacts: diff.json, clang-tidy.txt, clang-format.patch, CMakeCache.txt, console-log.txt, test-results.xml
Pre-merge checks is in beta. Report issue. Please join beta or enable it for your project.