summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/sanitizer_common/sanitizer_procmaps_linux.cc
Commit message (Collapse)AuthorAgeFilesLines
* compiler-rt: Rename .cc file in lib/sanitizer_common to .cppNico Weber2019-07-311-81/+0
| | | | | | | | | | | See https://reviews.llvm.org/D58620 for discussion, and for the commands I ran. In addition I also ran for f in $(svn diff | diffstat | grep .cc | cut -f 2 -d ' '); do rg $f . ; done and manually updated (many) references to renamed files found by that. llvm-svn: 367463
* Update the file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-191-4/+3
| | | | | | | | | | | | | | | | | to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636
* [asan] Support running without /procEvgeniy Stepanov2019-01-081-0/+1
| | | | | | | | | | | | | | | | | | Summary: This patch lets ASan run when /proc is not accessible (ex. not mounted yet). It includes a special test-only flag that emulates this condition in an unpriviledged process. This only matters on Linux, where /proc is necessary to enumerate virtual memory mappings. Reviewers: vitalybuka, pcc, krytarowski Subscribers: kubamracek, llvm-commits Differential Revision: https://reviews.llvm.org/D56141 llvm-svn: 350590
* Revert "[asan] Support running without /proc.", +1Evgeniy Stepanov2018-12-281-5/+0
| | | | | | | | | Revert r350104 "[asan] Fix build on windows." Revert r350101 "[asan] Support running without /proc." These changes break Mac build, too. llvm-svn: 350112
* [asan] Support running without /proc.Evgeniy Stepanov2018-12-271-0/+5
| | | | | | | | | | | | | | | | | | Summary: This patch lets ASan run when /proc is not accessible (ex. not mounted yet). It includes a special test-only flag that emulates this condition in an unpriviledged process. This only matters on Linux, where /proc is necessary to enumerate virtual memory mappings. Reviewers: pcc, vitalybuka Subscribers: kubamracek, llvm-commits Differential Revision: https://reviews.llvm.org/D55874 llvm-svn: 350101
* [LSan] Fix one source of stale segments in the process memory mapping.Alex Shlyapnikov2017-11-281-2/+6
| | | | | | | | | | | | | | | | Summary: Load process memory map after updating the same cache to reflect the umap happening in the process of updating. Also clear out the buffer in case of failed read of /proc/self/maps (not the source of stale segments, but can lead to the similar crash). Reviewers: eugenis Subscribers: llvm-commits, kubamracek Differential Revision: https://reviews.llvm.org/D40529 llvm-svn: 319237
* Removed platform-specific ifdefs from sanitizer_procmaps.hFrancis Ricci2017-09-221-30/+30
| | | | | | | | | | | | | | | | Summary: Removed platform-specific ifdefs for linux, mac, freebsd and netbsd from sanitizer_procmaps.h Patch by Yicheng Wang <yichengfb@fb.com> Reviewers: kcc, kubamracek, alekseyshl, fjricci, vitalybuka Reviewed By: fjricci, vitalybuka Subscribers: vitalybuka, emaste, krytarowski, llvm-commits Differential Revision: https://reviews.llvm.org/D38098 llvm-svn: 313999
* Use internal_strncpy to copy filename in linux procmapsFrancis Ricci2017-07-111-6/+5
| | | | | | | | | | | | Cleaner than using a while loop to copy the string character by character. Reviewers: alekseyshl, glider Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D35136 llvm-svn: 307696
* Refactor MemoryMappingLayout::Next to use a single struct instead of output ↵Francis Ricci2017-07-111-26/+12
| | | | | | | | | | | | | | | | | | | | | | | | | parameters. NFC. Summary: This is the first in a series of patches to refactor sanitizer_procmaps to allow MachO section information to be exposed on darwin. In addition, grouping all segment information in a single struct is cleaner than passing it through a large set of output parameters, and avoids the need for annotations of NULL parameters for unneeded information. The filename string is optional and must be managed and supplied by the calling function. This is to allow the MemoryMappedSegment struct to be stored on the stack without causing overly large stack sizes. Reviewers: alekseyshl, kubamracek, glider Subscribers: emaste, llvm-commits Differential Revision: https://reviews.llvm.org/D35135 llvm-svn: 307688
* [asan] make asan under sandboxes more robustKostya Serebryany2017-05-151-2/+2
| | | | llvm-svn: 303132
* [sanitizer] Track architecture and UUID of modules in LoadedModuleKuba Mracek2016-12-021-1/+3
| | | | | | | | | | When we enumerate loaded modules, we only track the module name and base address, which then has several problems on macOS. Dylibs and executables often have several architecture slices and not storing which architecture/UUID is actually loaded creates problems with symbolication: A file path + offset isn't enough to correctly symbolicate, since the offset can be valid in multiple slices. This is especially common for Haswell+ X86_64 machines, where x86_64h slices are preferred, but if one is not available, a regular x86_64 is loaded instead. But the same issue exists for i386 vs. x86_64 as well. This patch adds tracking of arch and UUID for each LoadedModule. At this point, this information isn't used in reports, but this is the first step. The goal is to correctly identify which slice is loaded in symbolication, and also to output this information in reports so that we can tell which exact slices were loaded in post-mortem analysis. Differential Revision: https://reviews.llvm.org/D26632 llvm-svn: 288537
* [libsanitizer] Fix bugs and wiki links to point to GitHub.Alexander Potapenko2015-12-041-1/+1
| | | | llvm-svn: 254738
* [Sanitizer] Teach ReadFileToBuffer to distinguish empty file from ↵Alexey Samsonov2015-07-171-2/+2
| | | | | | | | | | | | | | | | inaccessible file. Summary: This fixes https://code.google.com/p/address-sanitizer/issues/detail?id=399 (sanitizers crash with empty suppression files). Reviewers: kcc Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D11284 llvm-svn: 242594
* Segregate FreeBSD-specific parts from sanitizer_procmaps_linux.ccViktor Kutuzov2014-08-061-217/+3
| | | | | | Differential Revision: http://reviews.llvm.org/D4555 llvm-svn: 214955
* [asan] Exclude non-executable mappings from coverage.Evgeniy Stepanov2014-06-111-3/+3
| | | | llvm-svn: 210649
* Add FreeBSD support to sanitizers' procmaps facilitiesViktor Kutuzov2014-04-011-14/+63
| | | | llvm-svn: 205291
* A set of trivial changes to support sanitizers on FreeBSD.Alexey Samsonov2014-03-041-2/+2
| | | | | | Patch by Viktor Kutuzov! llvm-svn: 202801
* [Sanitizer] Remove now unused symbolization functionality from ↵Alexey Samsonov2013-12-251-12/+15
| | | | | | MemoryMappingLayout llvm-svn: 198014
* [Sanitizer] Use different MemoryMappingLayout::DumpListOfModules on Linux ↵Alexey Samsonov2013-12-251-0/+25
| | | | | | | | and Mac. Make a unit test added in r198004 more robust. llvm-svn: 198012
* [Sanitizer] Move OS-specific code for MemoryMappingLayout into separate ↵Alexey Samsonov2013-12-251-0/+227
source files. llvm-svn: 198003
OpenPOWER on IntegriCloud