aboutsummaryrefslogtreecommitdiff
path: root/clang/docs/AddressSanitizer.rst
AgeCommit message (Collapse)AuthorFilesLines
2022-04-28[asan] Enable detect_stack_use_after_return=1 by default on LinuxVitaly Buka1-1/+2
By default -fsanitize=address already compiles with this check, why not use it. For compatibly it can be disabled with env ASAN_OPTIONS=detect_stack_use_after_return=0. Reviewed By: eugenis, kda, #sanitizers, hans Differential Revision: https://reviews.llvm.org/D124057
2022-04-27Revert "[asan] Enable detect_stack_use_after_return=1 by default"Vitaly Buka1-1/+1
Temporarily revert the option to fix https://bugs.chromium.org/p/chromium/issues/detail?id=1319387 This reverts option default and documentation of the commit. Test changes are not being reverted as they are improvement and break reliance on option defaults. Additional memory usage is a problem on mobile devices with low memory. Even heavy thread desktop programs may need some FakeStack tunning. This reverts commit 4b4437c084e2b8a2643e97e7aef125c438635a4d.
2022-04-22[asan] Enable detect_stack_use_after_return=1 by defaultVitaly Buka1-5/+5
By default -fsanitize=address already compiles with this check, why not use it. For compatibly it can be disabled with env ASAN_OPTIONS=detect_stack_use_after_return=0. Reviewed By: eugenis, kda, #sanitizers, hans Differential Revision: https://reviews.llvm.org/D124057
2022-02-18[asan] Add support for disable_sanitizer_instrumentation attributeAlexander Potapenko1-0/+6
For ASan this will effectively serve as a synonym for __attribute__((no_sanitize("address"))). Adding the disable_sanitizer_instrumentation to functions will drop the sanitize_XXX attributes on the IR level. This is the third reland of https://reviews.llvm.org/D114421. Now that TSan test is fixed (https://reviews.llvm.org/D120050) there should be no deadlocks. Differential Revision: https://reviews.llvm.org/D120055
2022-02-15Revert "[asan] Add support for disable_sanitizer_instrumentation attribute"Alexander Potapenko1-6/+0
This reverts commit dd145f953db3dafbc019f1d3783bb4f09a28af92. https://reviews.llvm.org/D119726, like https://reviews.llvm.org/D114421, still causes TSan to fail, see https://lab.llvm.org/buildbot/#/builders/70/builds/18020 Differential Revision: https://reviews.llvm.org/D119838
2022-02-15[asan] Add support for disable_sanitizer_instrumentation attributeAlexander Potapenko1-0/+6
For ASan this will effectively serve as a synonym for __attribute__((no_sanitize("address"))) This is a reland of https://reviews.llvm.org/D114421 Reviewed By: melver, eugenis Differential Revision: https://reviews.llvm.org/D119726
2021-12-10Revert "[asan] Add support for disable_sanitizer_instrumentation attribute"Andrew Browne1-6/+0
This reverts commit 2b554920f11c8b763cd9ed9003f4e19b919b8e1f. This change causes tsan test timeout on x86_64-linux-autoconf. The timeout can be reproduced by: git clone https://github.com/llvm/llvm-zorg.git BUILDBOT_CLOBBER= BUILDBOT_REVISION=eef8f3f85679c5b1ae725bade1c23ab7bb6b924f llvm-zorg/zorg/buildbot/builders/sanitizers/buildbot_standard.sh
2021-12-10[asan] Add support for disable_sanitizer_instrumentation attributeAlexander Potapenko1-0/+6
For ASan this will effectively serve as a synonym for __attribute__((no_sanitize("address"))) Differential Revision: https://reviews.llvm.org/D114421
2021-08-21[clang] Fix typos in documentation (NFC)Kazu Hirata1-3/+3
2021-07-15[asan] Slightly modified the documentation.Kirill Stoimenov1-1/+1
The goal of this change is to test if I can commit changes. Reviewed By: kcc Differential Revision: https://reviews.llvm.org/D106101
2021-07-14[asan][clang] Add flag to outline instrumentationKirill Stoimenov1-0/+12
Summary This option can be used to reduce the size of the binary. The trade-off in this case would be the run-time performance. Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D105726
2021-07-08Add documentation for -fsanitize-address-use-after-return.Kevin Athey1-2/+23
for issue: https://github.com/google/sanitizers/issues/1394 Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D104155
2021-05-04[clang] accept -fsanitize-ignorelist= in addition to -fsanitize-blacklist=Nico Weber1-2/+2
Use that for internal names (including the default ignorelists of the sanitizers). Differential Revision: https://reviews.llvm.org/D101832
2019-05-30[Docs] Modernize references to macOSJ. Ryan Stinnett1-4/+4
Summary: This updates all places in documentation that refer to "Mac OS X", "OS X", etc. to instead use the modern name "macOS" when no specific version number is mentioned. If a specific version is mentioned, this attempts to use the OS name at the time of that version: * Mac OS X for 10.0 - 10.7 * OS X for 10.8 - 10.11 * macOS for 10.12 - present Reviewers: JDevlieghere Subscribers: mgorny, christof, arphaman, cfe-commits, lldb-commits, libcxx-commits, llvm-commits Tags: #clang, #lldb, #libc, #llvm Differential Revision: https://reviews.llvm.org/D62654 llvm-svn: 362113
2018-12-11[ASan] Minor documentation fix: clarify static linking limitation.Max Moroz1-1/+1
Summary: ASan does not support statically linked binaries, but ASan runtime itself can be statically linked into a target binary executable. Reviewers: eugenis, kcc Reviewed By: eugenis Subscribers: cfe-commits, llvm-commits Differential Revision: https://reviews.llvm.org/D55066 llvm-svn: 348863
2018-11-27[docs] UBSan and ASan are supported on WindowsReid Kleckner1-0/+4
Also fix a bullet list. Fixes PR39775 llvm-svn: 347633
2018-11-04Update our URLs in clang doc to use httpsSylvestre Ledru1-1/+1
llvm-svn: 346101
2018-07-25[Docs] Update supported oses for safestack, ubsan, asan, tsan and msanDavid Carlier1-0/+1
Adding oses others than Linux. llvm-svn: 337926
2018-06-21ASan docs: no_sanitize("address") works on globals.Evgeniy Stepanov1-5/+9
Summary: Mention that no_sanitize attribute can be used with globals. Reviewers: alekseyshl Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D48390 llvm-svn: 335193
2017-09-13[docs] Update LeakSanitizer documentation to reflect OS X supportFrancis Ricci1-1/+2
Reviewers: kcc, alekseyshl, kubamracek, glider Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D37811 llvm-svn: 313179
2016-12-15[asan][docs] Fix the documentation to use clang++ for the C++ exampleAnna Zaks1-3/+3
After Darwin has been updated not to link in stdc++ on Darwin this actually started to break. Differential Revision: https://reviews.llvm.org/D27598 llvm-svn: 289887
2016-08-02Updated documentationVitaly Buka1-1/+2
Reviewers: kcc, eugenis Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D22992 llvm-svn: 277488
2016-01-22[Docs] Slightly update LSan documentation.Alexey Samsonov1-0/+17
llvm-svn: 258476
2015-12-04[Docs] Sanitizer docs migrated from code.google.com to github.com.Alexey Samsonov1-2/+1
llvm-svn: 254672
2015-10-19docs: remote stale refsSaleem Abdulrasool1-6/+5
Since the attribute documentation is now auto-generated, the previous references are no longer valid. This prevented the docs build from completing successfully. llvm-svn: 250674
2015-06-25[docs] Several updates to the Address Sanitizer webpage.Anna Zaks1-45/+101
- Added the description of the interceptor suppression. - Re-organized a bit: grouped a few things under the Issue Suppression section, grouped IOC and leaks under a section, placed symbolication info into Symbolizing the Reports section.. - In supported platforms: "MacOS" -> "OS X"; added "iOS Simulator" - Added a paragraph to the Usage section describing when DYLD_INSERT_LIBRARIES might need to be used. - "attribute((no_sanitize_address))" -> "__attribute__((no_sanitize("address")))" - Updated Leak Sanitizer page with most up to date info. .... http://reviews.llvm.org/D10559 llvm-svn: 240725
2015-02-18[docs] Recommend to use CMake for building sanitizers.Alexey Samsonov1-2/+1
llvm-svn: 229754
2015-02-17Revert "Remove support for building sanitizers from Makefile/autoconf build."Matthias Braun1-1/+2
This reverts commit r229554. Reverting this commit for now as several apple internal builds still rely on this functionality. llvm-svn: 229582
2015-02-17Remove support for building sanitizers from Makefile/autoconf build.Alexey Samsonov1-2/+1
They autotools build has a number of missing features, supports less OS, architectures, build configurations, doesn't have any tests and is hard to support in sync with CMake build. llvm-svn: 229554
2015-01-13Mention FreeBSD support.Roman Divacky1-0/+1
llvm-svn: 225834
2014-10-17[ASan] Improve blacklisting of global variables.Alexey Samsonov1-2/+2
This commit changes the way we blacklist global variables in ASan. Now the global is excluded from instrumentation (either regular bounds checking, or initialization-order checking) if: 1) Global is explicitly blacklisted by its mangled name. This part is left unchanged. 2) SourceLocation of a global is in blacklisted source file. This changes the old behavior, where instead of looking at the SourceLocation of a variable we simply considered llvm::Module identifier. This was wrong, as identifier may not correspond to the file name, and we incorrectly disabled instrumentation for globals coming from #include'd files. 3) Global is blacklisted by type. Now we build the type of a global variable using Clang machinery (QualType::getAsString()), instead of llvm::StructType::getName(). After this commit, the active users of ASan blacklist files may have to revisit them (this is a backwards-incompatible change). llvm-svn: 220097
2014-01-31[sanitizer] update the list of supported platforms in the docsKostya Serebryany1-4/+4
llvm-svn: 200529
2014-01-16[ASan] Enough to have llvm-symbolizer in $PATH.Alexander Potapenko1-1/+2
llvm-svn: 199388
2014-01-16[ASan] Typo fix (symbolize=0 disables online symbolization)Alexander Potapenko1-2/+2
llvm-svn: 199385
2014-01-16[ASan] Describe online/offline symbolization of reports, mention dsymutil.Alexander Potapenko1-5/+21
llvm-svn: 199383
2013-12-11Mention LeakSanitizer in AddressSanitizer docs.Sergey Matveev1-0/+7
llvm-svn: 197022
2013-08-15Update sanitizer attribute documentation to match behaviour change in r187967.Evgeniy Stepanov1-2/+1
llvm-svn: 188459
2013-08-07Documentation for sanitizer special case list format and ↵Alexey Samsonov1-0/+30
-f(no-)?sanitize-blacklist flag llvm-svn: 187871
2013-07-19Revert r186672 - turns out ASan supports Mac OS 10.6 yet.Alexey Samsonov1-1/+1
llvm-svn: 186673
2013-07-19[ASan] Reflect the dropped Mac OS 10.6 support in docsAlexey Samsonov1-1/+1
llvm-svn: 186672
2013-03-14Documentation: improve formattingDmitri Gribenko1-3/+3
llvm-svn: 177066
2013-03-14[ASan] Update docs for -fsanitize=init-order optionAlexey Samsonov1-0/+9
llvm-svn: 177062
2013-02-26Unify clang/llvm attributes for asan/tsan/msan (Clang part)Kostya Serebryany1-2/+3
These are two related changes (one in llvm, one in clang). LLVM: - rename address_safety => sanitize_address (the enum value is the same, so we preserve binary compatibility with old bitcode) - rename thread_safety => sanitize_thread - rename no_uninitialized_checks -> sanitize_memory CLANG: - add __attribute__((no_sanitize_address)) as a synonym for __attribute__((no_address_safety_analysis)) - add __attribute__((no_sanitize_thread)) - add __attribute__((no_sanitize_memory)) for S in address thread memory If -fsanitize=S is present and __attribute__((no_sanitize_S)) is not set llvm attribute sanitize_S llvm-svn: 176076
2012-12-15Documentation: random cleanups. Use monospaced font where appropriate,Dmitri Gribenko1-64/+59
highlight console output with "code-block:: console", etc. llvm-svn: 170276
2012-12-13docs: More reST conversion.Sean Silva1-0/+158
Sorry for the large commit, but it is much faster to convert in batches. llvm-svn: 170067