mirror-llvm-project/clang/docs/ShadowCallStack.md

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

212 lines
10 KiB
Markdown
Raw Permalink Normal View History

[clang][docs] Rewrite 20 selected Clang docs from reST to Markdown (#208310) Tracking issue: https://github.com/llvm/llvm-project/issues/201242 Migration guide docs: https://llvm.org/docs/SphinxQuickstartTemplate.html#markdown-migration-guidelines RFC: https://discourse.llvm.org/t/rfc-make-myst-markdown-the-llvm-docs-format-rip-rest/90840 This change was produced with rst2myst plus LLM cleanups. I manually paged through all of the linked HTML documents looking for visual artifacts, and I fixed everything I found. To reviewers: Please spot check the generated HTML below, and spot check the diff to look for artifacts. This change is too large to review everything line-by-line, but if you check 10 pages of documentation, and only find one migration bug, I hope you think that this is good enough to land. We have existing reST bugs that this fixes (mostly italic blocks that should be code font spans). ----- Links to the updated HTML for validation: | Source file | Before HTML | After HTML | |---|---|---| | `clang/docs/UsersManual.md` | [before](https://clang.llvm.org/docs/UsersManual.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/UsersManual.html) | | `clang/docs/SanitizerStats.md` | [before](https://clang.llvm.org/docs/SanitizerStats.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SanitizerStats.html) | | `clang/docs/SanitizerSpecialCaseList.md` | [before](https://clang.llvm.org/docs/SanitizerSpecialCaseList.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SanitizerSpecialCaseList.html) | | `clang/docs/OverflowBehaviorTypes.md` | [before](https://clang.llvm.org/docs/OverflowBehaviorTypes.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/OverflowBehaviorTypes.html) | | `clang/docs/LTOVisibility.md` | [before](https://clang.llvm.org/docs/LTOVisibility.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/LTOVisibility.html) | | `clang/docs/PointerAuthentication.md` | [before](https://clang.llvm.org/docs/PointerAuthentication.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/PointerAuthentication.html) | | `clang/docs/SafeStack.md` | [before](https://clang.llvm.org/docs/SafeStack.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SafeStack.html) | | `clang/docs/ShadowCallStack.md` | [before](https://clang.llvm.org/docs/ShadowCallStack.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/ShadowCallStack.html) | | `clang/docs/StructureProtection.md` | [before](https://clang.llvm.org/docs/StructureProtection.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/StructureProtection.html) | | `clang/docs/SourceBasedCodeCoverage.md` | [before](https://clang.llvm.org/docs/SourceBasedCodeCoverage.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SourceBasedCodeCoverage.html) | | `clang/docs/StandardCPlusPlusModules.md` | [before](https://clang.llvm.org/docs/StandardCPlusPlusModules.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/StandardCPlusPlusModules.html) | | `clang/docs/Modules.md` | [before](https://clang.llvm.org/docs/Modules.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/Modules.html) | | `clang/docs/MSVCCompatibility.md` | [before](https://clang.llvm.org/docs/MSVCCompatibility.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/MSVCCompatibility.html) | | `clang/docs/MisExpect.md` | [before](https://clang.llvm.org/docs/MisExpect.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/MisExpect.html) | | `clang/docs/OpenCLSupport.md` | [before](https://clang.llvm.org/docs/OpenCLSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/OpenCLSupport.html) | | `clang/docs/OpenMPSupport.md` | [before](https://clang.llvm.org/docs/OpenMPSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/OpenMPSupport.html) | | `clang/docs/SYCLSupport.md` | [before](https://clang.llvm.org/docs/SYCLSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SYCLSupport.html) | | `clang/docs/HIPSupport.md` | [before](https://clang.llvm.org/docs/HIPSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/HIPSupport.html) | | `clang/docs/HLSL/HLSLDocs.md` | [before](https://clang.llvm.org/docs/HLSL/HLSLDocs.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/HLSL/HLSLDocs.html) | | `clang/docs/ThinLTO.md` | [before](https://clang.llvm.org/docs/ThinLTO.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/ThinLTO.html) | --------- Co-authored-by: Chris B <chris.bieneman@me.com>
2026-07-09 07:16:15 -08:00
# ShadowCallStack
[clang][docs] Rewrite 20 selected Clang docs from reST to Markdown (#208310) Tracking issue: https://github.com/llvm/llvm-project/issues/201242 Migration guide docs: https://llvm.org/docs/SphinxQuickstartTemplate.html#markdown-migration-guidelines RFC: https://discourse.llvm.org/t/rfc-make-myst-markdown-the-llvm-docs-format-rip-rest/90840 This change was produced with rst2myst plus LLM cleanups. I manually paged through all of the linked HTML documents looking for visual artifacts, and I fixed everything I found. To reviewers: Please spot check the generated HTML below, and spot check the diff to look for artifacts. This change is too large to review everything line-by-line, but if you check 10 pages of documentation, and only find one migration bug, I hope you think that this is good enough to land. We have existing reST bugs that this fixes (mostly italic blocks that should be code font spans). ----- Links to the updated HTML for validation: | Source file | Before HTML | After HTML | |---|---|---| | `clang/docs/UsersManual.md` | [before](https://clang.llvm.org/docs/UsersManual.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/UsersManual.html) | | `clang/docs/SanitizerStats.md` | [before](https://clang.llvm.org/docs/SanitizerStats.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SanitizerStats.html) | | `clang/docs/SanitizerSpecialCaseList.md` | [before](https://clang.llvm.org/docs/SanitizerSpecialCaseList.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SanitizerSpecialCaseList.html) | | `clang/docs/OverflowBehaviorTypes.md` | [before](https://clang.llvm.org/docs/OverflowBehaviorTypes.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/OverflowBehaviorTypes.html) | | `clang/docs/LTOVisibility.md` | [before](https://clang.llvm.org/docs/LTOVisibility.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/LTOVisibility.html) | | `clang/docs/PointerAuthentication.md` | [before](https://clang.llvm.org/docs/PointerAuthentication.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/PointerAuthentication.html) | | `clang/docs/SafeStack.md` | [before](https://clang.llvm.org/docs/SafeStack.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SafeStack.html) | | `clang/docs/ShadowCallStack.md` | [before](https://clang.llvm.org/docs/ShadowCallStack.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/ShadowCallStack.html) | | `clang/docs/StructureProtection.md` | [before](https://clang.llvm.org/docs/StructureProtection.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/StructureProtection.html) | | `clang/docs/SourceBasedCodeCoverage.md` | [before](https://clang.llvm.org/docs/SourceBasedCodeCoverage.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SourceBasedCodeCoverage.html) | | `clang/docs/StandardCPlusPlusModules.md` | [before](https://clang.llvm.org/docs/StandardCPlusPlusModules.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/StandardCPlusPlusModules.html) | | `clang/docs/Modules.md` | [before](https://clang.llvm.org/docs/Modules.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/Modules.html) | | `clang/docs/MSVCCompatibility.md` | [before](https://clang.llvm.org/docs/MSVCCompatibility.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/MSVCCompatibility.html) | | `clang/docs/MisExpect.md` | [before](https://clang.llvm.org/docs/MisExpect.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/MisExpect.html) | | `clang/docs/OpenCLSupport.md` | [before](https://clang.llvm.org/docs/OpenCLSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/OpenCLSupport.html) | | `clang/docs/OpenMPSupport.md` | [before](https://clang.llvm.org/docs/OpenMPSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/OpenMPSupport.html) | | `clang/docs/SYCLSupport.md` | [before](https://clang.llvm.org/docs/SYCLSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SYCLSupport.html) | | `clang/docs/HIPSupport.md` | [before](https://clang.llvm.org/docs/HIPSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/HIPSupport.html) | | `clang/docs/HLSL/HLSLDocs.md` | [before](https://clang.llvm.org/docs/HLSL/HLSLDocs.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/HLSL/HLSLDocs.html) | | `clang/docs/ThinLTO.md` | [before](https://clang.llvm.org/docs/ThinLTO.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/ThinLTO.html) | --------- Co-authored-by: Chris B <chris.bieneman@me.com>
2026-07-09 07:16:15 -08:00
```{contents}
:local:
```
[clang][docs] Rewrite 20 selected Clang docs from reST to Markdown (#208310) Tracking issue: https://github.com/llvm/llvm-project/issues/201242 Migration guide docs: https://llvm.org/docs/SphinxQuickstartTemplate.html#markdown-migration-guidelines RFC: https://discourse.llvm.org/t/rfc-make-myst-markdown-the-llvm-docs-format-rip-rest/90840 This change was produced with rst2myst plus LLM cleanups. I manually paged through all of the linked HTML documents looking for visual artifacts, and I fixed everything I found. To reviewers: Please spot check the generated HTML below, and spot check the diff to look for artifacts. This change is too large to review everything line-by-line, but if you check 10 pages of documentation, and only find one migration bug, I hope you think that this is good enough to land. We have existing reST bugs that this fixes (mostly italic blocks that should be code font spans). ----- Links to the updated HTML for validation: | Source file | Before HTML | After HTML | |---|---|---| | `clang/docs/UsersManual.md` | [before](https://clang.llvm.org/docs/UsersManual.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/UsersManual.html) | | `clang/docs/SanitizerStats.md` | [before](https://clang.llvm.org/docs/SanitizerStats.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SanitizerStats.html) | | `clang/docs/SanitizerSpecialCaseList.md` | [before](https://clang.llvm.org/docs/SanitizerSpecialCaseList.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SanitizerSpecialCaseList.html) | | `clang/docs/OverflowBehaviorTypes.md` | [before](https://clang.llvm.org/docs/OverflowBehaviorTypes.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/OverflowBehaviorTypes.html) | | `clang/docs/LTOVisibility.md` | [before](https://clang.llvm.org/docs/LTOVisibility.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/LTOVisibility.html) | | `clang/docs/PointerAuthentication.md` | [before](https://clang.llvm.org/docs/PointerAuthentication.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/PointerAuthentication.html) | | `clang/docs/SafeStack.md` | [before](https://clang.llvm.org/docs/SafeStack.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SafeStack.html) | | `clang/docs/ShadowCallStack.md` | [before](https://clang.llvm.org/docs/ShadowCallStack.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/ShadowCallStack.html) | | `clang/docs/StructureProtection.md` | [before](https://clang.llvm.org/docs/StructureProtection.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/StructureProtection.html) | | `clang/docs/SourceBasedCodeCoverage.md` | [before](https://clang.llvm.org/docs/SourceBasedCodeCoverage.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SourceBasedCodeCoverage.html) | | `clang/docs/StandardCPlusPlusModules.md` | [before](https://clang.llvm.org/docs/StandardCPlusPlusModules.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/StandardCPlusPlusModules.html) | | `clang/docs/Modules.md` | [before](https://clang.llvm.org/docs/Modules.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/Modules.html) | | `clang/docs/MSVCCompatibility.md` | [before](https://clang.llvm.org/docs/MSVCCompatibility.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/MSVCCompatibility.html) | | `clang/docs/MisExpect.md` | [before](https://clang.llvm.org/docs/MisExpect.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/MisExpect.html) | | `clang/docs/OpenCLSupport.md` | [before](https://clang.llvm.org/docs/OpenCLSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/OpenCLSupport.html) | | `clang/docs/OpenMPSupport.md` | [before](https://clang.llvm.org/docs/OpenMPSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/OpenMPSupport.html) | | `clang/docs/SYCLSupport.md` | [before](https://clang.llvm.org/docs/SYCLSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SYCLSupport.html) | | `clang/docs/HIPSupport.md` | [before](https://clang.llvm.org/docs/HIPSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/HIPSupport.html) | | `clang/docs/HLSL/HLSLDocs.md` | [before](https://clang.llvm.org/docs/HLSL/HLSLDocs.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/HLSL/HLSLDocs.html) | | `clang/docs/ThinLTO.md` | [before](https://clang.llvm.org/docs/ThinLTO.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/ThinLTO.html) | --------- Co-authored-by: Chris B <chris.bieneman@me.com>
2026-07-09 07:16:15 -08:00
## Introduction
ShadowCallStack is an instrumentation pass, currently only implemented for
aarch64 and RISC-V, that protects programs against return address overwrites
(e.g. stack buffer overflows.) It works by saving a function's return address
to a separately allocated 'shadow call stack' in the function prolog in
non-leaf functions and loading the return address from the shadow call stack
in the function epilog. The return address is also stored on the regular stack
for compatibility with unwinders, but is otherwise unused.
The aarch64 implementation is considered production ready, and
[clang][docs] Rewrite 20 selected Clang docs from reST to Markdown (#208310) Tracking issue: https://github.com/llvm/llvm-project/issues/201242 Migration guide docs: https://llvm.org/docs/SphinxQuickstartTemplate.html#markdown-migration-guidelines RFC: https://discourse.llvm.org/t/rfc-make-myst-markdown-the-llvm-docs-format-rip-rest/90840 This change was produced with rst2myst plus LLM cleanups. I manually paged through all of the linked HTML documents looking for visual artifacts, and I fixed everything I found. To reviewers: Please spot check the generated HTML below, and spot check the diff to look for artifacts. This change is too large to review everything line-by-line, but if you check 10 pages of documentation, and only find one migration bug, I hope you think that this is good enough to land. We have existing reST bugs that this fixes (mostly italic blocks that should be code font spans). ----- Links to the updated HTML for validation: | Source file | Before HTML | After HTML | |---|---|---| | `clang/docs/UsersManual.md` | [before](https://clang.llvm.org/docs/UsersManual.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/UsersManual.html) | | `clang/docs/SanitizerStats.md` | [before](https://clang.llvm.org/docs/SanitizerStats.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SanitizerStats.html) | | `clang/docs/SanitizerSpecialCaseList.md` | [before](https://clang.llvm.org/docs/SanitizerSpecialCaseList.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SanitizerSpecialCaseList.html) | | `clang/docs/OverflowBehaviorTypes.md` | [before](https://clang.llvm.org/docs/OverflowBehaviorTypes.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/OverflowBehaviorTypes.html) | | `clang/docs/LTOVisibility.md` | [before](https://clang.llvm.org/docs/LTOVisibility.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/LTOVisibility.html) | | `clang/docs/PointerAuthentication.md` | [before](https://clang.llvm.org/docs/PointerAuthentication.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/PointerAuthentication.html) | | `clang/docs/SafeStack.md` | [before](https://clang.llvm.org/docs/SafeStack.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SafeStack.html) | | `clang/docs/ShadowCallStack.md` | [before](https://clang.llvm.org/docs/ShadowCallStack.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/ShadowCallStack.html) | | `clang/docs/StructureProtection.md` | [before](https://clang.llvm.org/docs/StructureProtection.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/StructureProtection.html) | | `clang/docs/SourceBasedCodeCoverage.md` | [before](https://clang.llvm.org/docs/SourceBasedCodeCoverage.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SourceBasedCodeCoverage.html) | | `clang/docs/StandardCPlusPlusModules.md` | [before](https://clang.llvm.org/docs/StandardCPlusPlusModules.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/StandardCPlusPlusModules.html) | | `clang/docs/Modules.md` | [before](https://clang.llvm.org/docs/Modules.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/Modules.html) | | `clang/docs/MSVCCompatibility.md` | [before](https://clang.llvm.org/docs/MSVCCompatibility.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/MSVCCompatibility.html) | | `clang/docs/MisExpect.md` | [before](https://clang.llvm.org/docs/MisExpect.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/MisExpect.html) | | `clang/docs/OpenCLSupport.md` | [before](https://clang.llvm.org/docs/OpenCLSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/OpenCLSupport.html) | | `clang/docs/OpenMPSupport.md` | [before](https://clang.llvm.org/docs/OpenMPSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/OpenMPSupport.html) | | `clang/docs/SYCLSupport.md` | [before](https://clang.llvm.org/docs/SYCLSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SYCLSupport.html) | | `clang/docs/HIPSupport.md` | [before](https://clang.llvm.org/docs/HIPSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/HIPSupport.html) | | `clang/docs/HLSL/HLSLDocs.md` | [before](https://clang.llvm.org/docs/HLSL/HLSLDocs.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/HLSL/HLSLDocs.html) | | `clang/docs/ThinLTO.md` | [before](https://clang.llvm.org/docs/ThinLTO.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/ThinLTO.html) | --------- Co-authored-by: Chris B <chris.bieneman@me.com>
2026-07-09 07:16:15 -08:00
an [implementation of the runtime][scs-runtime] has been added to Android's libc
(bionic). An x86_64 implementation was evaluated using Chromium and was found
to have critical performance and security deficiencies--it was removed in
LLVM 9.0. Details on the x86_64 implementation can be found in the
[clang][docs] Rewrite 20 selected Clang docs from reST to Markdown (#208310) Tracking issue: https://github.com/llvm/llvm-project/issues/201242 Migration guide docs: https://llvm.org/docs/SphinxQuickstartTemplate.html#markdown-migration-guidelines RFC: https://discourse.llvm.org/t/rfc-make-myst-markdown-the-llvm-docs-format-rip-rest/90840 This change was produced with rst2myst plus LLM cleanups. I manually paged through all of the linked HTML documents looking for visual artifacts, and I fixed everything I found. To reviewers: Please spot check the generated HTML below, and spot check the diff to look for artifacts. This change is too large to review everything line-by-line, but if you check 10 pages of documentation, and only find one migration bug, I hope you think that this is good enough to land. We have existing reST bugs that this fixes (mostly italic blocks that should be code font spans). ----- Links to the updated HTML for validation: | Source file | Before HTML | After HTML | |---|---|---| | `clang/docs/UsersManual.md` | [before](https://clang.llvm.org/docs/UsersManual.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/UsersManual.html) | | `clang/docs/SanitizerStats.md` | [before](https://clang.llvm.org/docs/SanitizerStats.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SanitizerStats.html) | | `clang/docs/SanitizerSpecialCaseList.md` | [before](https://clang.llvm.org/docs/SanitizerSpecialCaseList.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SanitizerSpecialCaseList.html) | | `clang/docs/OverflowBehaviorTypes.md` | [before](https://clang.llvm.org/docs/OverflowBehaviorTypes.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/OverflowBehaviorTypes.html) | | `clang/docs/LTOVisibility.md` | [before](https://clang.llvm.org/docs/LTOVisibility.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/LTOVisibility.html) | | `clang/docs/PointerAuthentication.md` | [before](https://clang.llvm.org/docs/PointerAuthentication.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/PointerAuthentication.html) | | `clang/docs/SafeStack.md` | [before](https://clang.llvm.org/docs/SafeStack.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SafeStack.html) | | `clang/docs/ShadowCallStack.md` | [before](https://clang.llvm.org/docs/ShadowCallStack.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/ShadowCallStack.html) | | `clang/docs/StructureProtection.md` | [before](https://clang.llvm.org/docs/StructureProtection.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/StructureProtection.html) | | `clang/docs/SourceBasedCodeCoverage.md` | [before](https://clang.llvm.org/docs/SourceBasedCodeCoverage.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SourceBasedCodeCoverage.html) | | `clang/docs/StandardCPlusPlusModules.md` | [before](https://clang.llvm.org/docs/StandardCPlusPlusModules.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/StandardCPlusPlusModules.html) | | `clang/docs/Modules.md` | [before](https://clang.llvm.org/docs/Modules.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/Modules.html) | | `clang/docs/MSVCCompatibility.md` | [before](https://clang.llvm.org/docs/MSVCCompatibility.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/MSVCCompatibility.html) | | `clang/docs/MisExpect.md` | [before](https://clang.llvm.org/docs/MisExpect.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/MisExpect.html) | | `clang/docs/OpenCLSupport.md` | [before](https://clang.llvm.org/docs/OpenCLSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/OpenCLSupport.html) | | `clang/docs/OpenMPSupport.md` | [before](https://clang.llvm.org/docs/OpenMPSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/OpenMPSupport.html) | | `clang/docs/SYCLSupport.md` | [before](https://clang.llvm.org/docs/SYCLSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SYCLSupport.html) | | `clang/docs/HIPSupport.md` | [before](https://clang.llvm.org/docs/HIPSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/HIPSupport.html) | | `clang/docs/HLSL/HLSLDocs.md` | [before](https://clang.llvm.org/docs/HLSL/HLSLDocs.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/HLSL/HLSLDocs.html) | | `clang/docs/ThinLTO.md` | [before](https://clang.llvm.org/docs/ThinLTO.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/ThinLTO.html) | --------- Co-authored-by: Chris B <chris.bieneman@me.com>
2026-07-09 07:16:15 -08:00
[Clang 7.0.1 documentation][clang-701-doc].
[clang][docs] Rewrite 20 selected Clang docs from reST to Markdown (#208310) Tracking issue: https://github.com/llvm/llvm-project/issues/201242 Migration guide docs: https://llvm.org/docs/SphinxQuickstartTemplate.html#markdown-migration-guidelines RFC: https://discourse.llvm.org/t/rfc-make-myst-markdown-the-llvm-docs-format-rip-rest/90840 This change was produced with rst2myst plus LLM cleanups. I manually paged through all of the linked HTML documents looking for visual artifacts, and I fixed everything I found. To reviewers: Please spot check the generated HTML below, and spot check the diff to look for artifacts. This change is too large to review everything line-by-line, but if you check 10 pages of documentation, and only find one migration bug, I hope you think that this is good enough to land. We have existing reST bugs that this fixes (mostly italic blocks that should be code font spans). ----- Links to the updated HTML for validation: | Source file | Before HTML | After HTML | |---|---|---| | `clang/docs/UsersManual.md` | [before](https://clang.llvm.org/docs/UsersManual.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/UsersManual.html) | | `clang/docs/SanitizerStats.md` | [before](https://clang.llvm.org/docs/SanitizerStats.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SanitizerStats.html) | | `clang/docs/SanitizerSpecialCaseList.md` | [before](https://clang.llvm.org/docs/SanitizerSpecialCaseList.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SanitizerSpecialCaseList.html) | | `clang/docs/OverflowBehaviorTypes.md` | [before](https://clang.llvm.org/docs/OverflowBehaviorTypes.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/OverflowBehaviorTypes.html) | | `clang/docs/LTOVisibility.md` | [before](https://clang.llvm.org/docs/LTOVisibility.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/LTOVisibility.html) | | `clang/docs/PointerAuthentication.md` | [before](https://clang.llvm.org/docs/PointerAuthentication.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/PointerAuthentication.html) | | `clang/docs/SafeStack.md` | [before](https://clang.llvm.org/docs/SafeStack.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SafeStack.html) | | `clang/docs/ShadowCallStack.md` | [before](https://clang.llvm.org/docs/ShadowCallStack.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/ShadowCallStack.html) | | `clang/docs/StructureProtection.md` | [before](https://clang.llvm.org/docs/StructureProtection.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/StructureProtection.html) | | `clang/docs/SourceBasedCodeCoverage.md` | [before](https://clang.llvm.org/docs/SourceBasedCodeCoverage.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SourceBasedCodeCoverage.html) | | `clang/docs/StandardCPlusPlusModules.md` | [before](https://clang.llvm.org/docs/StandardCPlusPlusModules.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/StandardCPlusPlusModules.html) | | `clang/docs/Modules.md` | [before](https://clang.llvm.org/docs/Modules.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/Modules.html) | | `clang/docs/MSVCCompatibility.md` | [before](https://clang.llvm.org/docs/MSVCCompatibility.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/MSVCCompatibility.html) | | `clang/docs/MisExpect.md` | [before](https://clang.llvm.org/docs/MisExpect.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/MisExpect.html) | | `clang/docs/OpenCLSupport.md` | [before](https://clang.llvm.org/docs/OpenCLSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/OpenCLSupport.html) | | `clang/docs/OpenMPSupport.md` | [before](https://clang.llvm.org/docs/OpenMPSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/OpenMPSupport.html) | | `clang/docs/SYCLSupport.md` | [before](https://clang.llvm.org/docs/SYCLSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SYCLSupport.html) | | `clang/docs/HIPSupport.md` | [before](https://clang.llvm.org/docs/HIPSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/HIPSupport.html) | | `clang/docs/HLSL/HLSLDocs.md` | [before](https://clang.llvm.org/docs/HLSL/HLSLDocs.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/HLSL/HLSLDocs.html) | | `clang/docs/ThinLTO.md` | [before](https://clang.llvm.org/docs/ThinLTO.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/ThinLTO.html) | --------- Co-authored-by: Chris B <chris.bieneman@me.com>
2026-07-09 07:16:15 -08:00
### Comparison
To optimize for memory consumption and cache locality, the shadow call
stack stores only an array of return addresses. This is in contrast to other
[clang][docs] Rewrite 20 selected Clang docs from reST to Markdown (#208310) Tracking issue: https://github.com/llvm/llvm-project/issues/201242 Migration guide docs: https://llvm.org/docs/SphinxQuickstartTemplate.html#markdown-migration-guidelines RFC: https://discourse.llvm.org/t/rfc-make-myst-markdown-the-llvm-docs-format-rip-rest/90840 This change was produced with rst2myst plus LLM cleanups. I manually paged through all of the linked HTML documents looking for visual artifacts, and I fixed everything I found. To reviewers: Please spot check the generated HTML below, and spot check the diff to look for artifacts. This change is too large to review everything line-by-line, but if you check 10 pages of documentation, and only find one migration bug, I hope you think that this is good enough to land. We have existing reST bugs that this fixes (mostly italic blocks that should be code font spans). ----- Links to the updated HTML for validation: | Source file | Before HTML | After HTML | |---|---|---| | `clang/docs/UsersManual.md` | [before](https://clang.llvm.org/docs/UsersManual.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/UsersManual.html) | | `clang/docs/SanitizerStats.md` | [before](https://clang.llvm.org/docs/SanitizerStats.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SanitizerStats.html) | | `clang/docs/SanitizerSpecialCaseList.md` | [before](https://clang.llvm.org/docs/SanitizerSpecialCaseList.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SanitizerSpecialCaseList.html) | | `clang/docs/OverflowBehaviorTypes.md` | [before](https://clang.llvm.org/docs/OverflowBehaviorTypes.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/OverflowBehaviorTypes.html) | | `clang/docs/LTOVisibility.md` | [before](https://clang.llvm.org/docs/LTOVisibility.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/LTOVisibility.html) | | `clang/docs/PointerAuthentication.md` | [before](https://clang.llvm.org/docs/PointerAuthentication.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/PointerAuthentication.html) | | `clang/docs/SafeStack.md` | [before](https://clang.llvm.org/docs/SafeStack.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SafeStack.html) | | `clang/docs/ShadowCallStack.md` | [before](https://clang.llvm.org/docs/ShadowCallStack.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/ShadowCallStack.html) | | `clang/docs/StructureProtection.md` | [before](https://clang.llvm.org/docs/StructureProtection.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/StructureProtection.html) | | `clang/docs/SourceBasedCodeCoverage.md` | [before](https://clang.llvm.org/docs/SourceBasedCodeCoverage.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SourceBasedCodeCoverage.html) | | `clang/docs/StandardCPlusPlusModules.md` | [before](https://clang.llvm.org/docs/StandardCPlusPlusModules.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/StandardCPlusPlusModules.html) | | `clang/docs/Modules.md` | [before](https://clang.llvm.org/docs/Modules.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/Modules.html) | | `clang/docs/MSVCCompatibility.md` | [before](https://clang.llvm.org/docs/MSVCCompatibility.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/MSVCCompatibility.html) | | `clang/docs/MisExpect.md` | [before](https://clang.llvm.org/docs/MisExpect.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/MisExpect.html) | | `clang/docs/OpenCLSupport.md` | [before](https://clang.llvm.org/docs/OpenCLSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/OpenCLSupport.html) | | `clang/docs/OpenMPSupport.md` | [before](https://clang.llvm.org/docs/OpenMPSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/OpenMPSupport.html) | | `clang/docs/SYCLSupport.md` | [before](https://clang.llvm.org/docs/SYCLSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SYCLSupport.html) | | `clang/docs/HIPSupport.md` | [before](https://clang.llvm.org/docs/HIPSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/HIPSupport.html) | | `clang/docs/HLSL/HLSLDocs.md` | [before](https://clang.llvm.org/docs/HLSL/HLSLDocs.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/HLSL/HLSLDocs.html) | | `clang/docs/ThinLTO.md` | [before](https://clang.llvm.org/docs/ThinLTO.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/ThinLTO.html) | --------- Co-authored-by: Chris B <chris.bieneman@me.com>
2026-07-09 07:16:15 -08:00
schemes, like {doc}`SafeStack`, that mirror the entire stack and trade-off
consuming more memory for shorter function prologs and epilogs with fewer
memory accesses.
[clang][docs] Rewrite 20 selected Clang docs from reST to Markdown (#208310) Tracking issue: https://github.com/llvm/llvm-project/issues/201242 Migration guide docs: https://llvm.org/docs/SphinxQuickstartTemplate.html#markdown-migration-guidelines RFC: https://discourse.llvm.org/t/rfc-make-myst-markdown-the-llvm-docs-format-rip-rest/90840 This change was produced with rst2myst plus LLM cleanups. I manually paged through all of the linked HTML documents looking for visual artifacts, and I fixed everything I found. To reviewers: Please spot check the generated HTML below, and spot check the diff to look for artifacts. This change is too large to review everything line-by-line, but if you check 10 pages of documentation, and only find one migration bug, I hope you think that this is good enough to land. We have existing reST bugs that this fixes (mostly italic blocks that should be code font spans). ----- Links to the updated HTML for validation: | Source file | Before HTML | After HTML | |---|---|---| | `clang/docs/UsersManual.md` | [before](https://clang.llvm.org/docs/UsersManual.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/UsersManual.html) | | `clang/docs/SanitizerStats.md` | [before](https://clang.llvm.org/docs/SanitizerStats.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SanitizerStats.html) | | `clang/docs/SanitizerSpecialCaseList.md` | [before](https://clang.llvm.org/docs/SanitizerSpecialCaseList.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SanitizerSpecialCaseList.html) | | `clang/docs/OverflowBehaviorTypes.md` | [before](https://clang.llvm.org/docs/OverflowBehaviorTypes.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/OverflowBehaviorTypes.html) | | `clang/docs/LTOVisibility.md` | [before](https://clang.llvm.org/docs/LTOVisibility.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/LTOVisibility.html) | | `clang/docs/PointerAuthentication.md` | [before](https://clang.llvm.org/docs/PointerAuthentication.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/PointerAuthentication.html) | | `clang/docs/SafeStack.md` | [before](https://clang.llvm.org/docs/SafeStack.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SafeStack.html) | | `clang/docs/ShadowCallStack.md` | [before](https://clang.llvm.org/docs/ShadowCallStack.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/ShadowCallStack.html) | | `clang/docs/StructureProtection.md` | [before](https://clang.llvm.org/docs/StructureProtection.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/StructureProtection.html) | | `clang/docs/SourceBasedCodeCoverage.md` | [before](https://clang.llvm.org/docs/SourceBasedCodeCoverage.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SourceBasedCodeCoverage.html) | | `clang/docs/StandardCPlusPlusModules.md` | [before](https://clang.llvm.org/docs/StandardCPlusPlusModules.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/StandardCPlusPlusModules.html) | | `clang/docs/Modules.md` | [before](https://clang.llvm.org/docs/Modules.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/Modules.html) | | `clang/docs/MSVCCompatibility.md` | [before](https://clang.llvm.org/docs/MSVCCompatibility.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/MSVCCompatibility.html) | | `clang/docs/MisExpect.md` | [before](https://clang.llvm.org/docs/MisExpect.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/MisExpect.html) | | `clang/docs/OpenCLSupport.md` | [before](https://clang.llvm.org/docs/OpenCLSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/OpenCLSupport.html) | | `clang/docs/OpenMPSupport.md` | [before](https://clang.llvm.org/docs/OpenMPSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/OpenMPSupport.html) | | `clang/docs/SYCLSupport.md` | [before](https://clang.llvm.org/docs/SYCLSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SYCLSupport.html) | | `clang/docs/HIPSupport.md` | [before](https://clang.llvm.org/docs/HIPSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/HIPSupport.html) | | `clang/docs/HLSL/HLSLDocs.md` | [before](https://clang.llvm.org/docs/HLSL/HLSLDocs.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/HLSL/HLSLDocs.html) | | `clang/docs/ThinLTO.md` | [before](https://clang.llvm.org/docs/ThinLTO.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/ThinLTO.html) | --------- Co-authored-by: Chris B <chris.bieneman@me.com>
2026-07-09 07:16:15 -08:00
[Return Flow Guard][rfg] is a pure software implementation of shadow call stacks
on x86_64. Like the previous implementation of ShadowCallStack on x86_64, it is
inherently racy due to the architecture's use of the stack for calls and
returns.
[clang][docs] Rewrite 20 selected Clang docs from reST to Markdown (#208310) Tracking issue: https://github.com/llvm/llvm-project/issues/201242 Migration guide docs: https://llvm.org/docs/SphinxQuickstartTemplate.html#markdown-migration-guidelines RFC: https://discourse.llvm.org/t/rfc-make-myst-markdown-the-llvm-docs-format-rip-rest/90840 This change was produced with rst2myst plus LLM cleanups. I manually paged through all of the linked HTML documents looking for visual artifacts, and I fixed everything I found. To reviewers: Please spot check the generated HTML below, and spot check the diff to look for artifacts. This change is too large to review everything line-by-line, but if you check 10 pages of documentation, and only find one migration bug, I hope you think that this is good enough to land. We have existing reST bugs that this fixes (mostly italic blocks that should be code font spans). ----- Links to the updated HTML for validation: | Source file | Before HTML | After HTML | |---|---|---| | `clang/docs/UsersManual.md` | [before](https://clang.llvm.org/docs/UsersManual.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/UsersManual.html) | | `clang/docs/SanitizerStats.md` | [before](https://clang.llvm.org/docs/SanitizerStats.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SanitizerStats.html) | | `clang/docs/SanitizerSpecialCaseList.md` | [before](https://clang.llvm.org/docs/SanitizerSpecialCaseList.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SanitizerSpecialCaseList.html) | | `clang/docs/OverflowBehaviorTypes.md` | [before](https://clang.llvm.org/docs/OverflowBehaviorTypes.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/OverflowBehaviorTypes.html) | | `clang/docs/LTOVisibility.md` | [before](https://clang.llvm.org/docs/LTOVisibility.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/LTOVisibility.html) | | `clang/docs/PointerAuthentication.md` | [before](https://clang.llvm.org/docs/PointerAuthentication.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/PointerAuthentication.html) | | `clang/docs/SafeStack.md` | [before](https://clang.llvm.org/docs/SafeStack.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SafeStack.html) | | `clang/docs/ShadowCallStack.md` | [before](https://clang.llvm.org/docs/ShadowCallStack.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/ShadowCallStack.html) | | `clang/docs/StructureProtection.md` | [before](https://clang.llvm.org/docs/StructureProtection.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/StructureProtection.html) | | `clang/docs/SourceBasedCodeCoverage.md` | [before](https://clang.llvm.org/docs/SourceBasedCodeCoverage.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SourceBasedCodeCoverage.html) | | `clang/docs/StandardCPlusPlusModules.md` | [before](https://clang.llvm.org/docs/StandardCPlusPlusModules.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/StandardCPlusPlusModules.html) | | `clang/docs/Modules.md` | [before](https://clang.llvm.org/docs/Modules.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/Modules.html) | | `clang/docs/MSVCCompatibility.md` | [before](https://clang.llvm.org/docs/MSVCCompatibility.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/MSVCCompatibility.html) | | `clang/docs/MisExpect.md` | [before](https://clang.llvm.org/docs/MisExpect.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/MisExpect.html) | | `clang/docs/OpenCLSupport.md` | [before](https://clang.llvm.org/docs/OpenCLSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/OpenCLSupport.html) | | `clang/docs/OpenMPSupport.md` | [before](https://clang.llvm.org/docs/OpenMPSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/OpenMPSupport.html) | | `clang/docs/SYCLSupport.md` | [before](https://clang.llvm.org/docs/SYCLSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SYCLSupport.html) | | `clang/docs/HIPSupport.md` | [before](https://clang.llvm.org/docs/HIPSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/HIPSupport.html) | | `clang/docs/HLSL/HLSLDocs.md` | [before](https://clang.llvm.org/docs/HLSL/HLSLDocs.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/HLSL/HLSLDocs.html) | | `clang/docs/ThinLTO.md` | [before](https://clang.llvm.org/docs/ThinLTO.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/ThinLTO.html) | --------- Co-authored-by: Chris B <chris.bieneman@me.com>
2026-07-09 07:16:15 -08:00
Intel [Control-flow Enforcement Technology][cet] (CET) is a proposed hardware
extension that would add native support to use a shadow stack to store/check
return addresses at call/return time. Being a hardware implementation, it
would not suffer from race conditions and would not incur the overhead of
function instrumentation, but it does require operating system support.
[clang][docs] Rewrite 20 selected Clang docs from reST to Markdown (#208310) Tracking issue: https://github.com/llvm/llvm-project/issues/201242 Migration guide docs: https://llvm.org/docs/SphinxQuickstartTemplate.html#markdown-migration-guidelines RFC: https://discourse.llvm.org/t/rfc-make-myst-markdown-the-llvm-docs-format-rip-rest/90840 This change was produced with rst2myst plus LLM cleanups. I manually paged through all of the linked HTML documents looking for visual artifacts, and I fixed everything I found. To reviewers: Please spot check the generated HTML below, and spot check the diff to look for artifacts. This change is too large to review everything line-by-line, but if you check 10 pages of documentation, and only find one migration bug, I hope you think that this is good enough to land. We have existing reST bugs that this fixes (mostly italic blocks that should be code font spans). ----- Links to the updated HTML for validation: | Source file | Before HTML | After HTML | |---|---|---| | `clang/docs/UsersManual.md` | [before](https://clang.llvm.org/docs/UsersManual.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/UsersManual.html) | | `clang/docs/SanitizerStats.md` | [before](https://clang.llvm.org/docs/SanitizerStats.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SanitizerStats.html) | | `clang/docs/SanitizerSpecialCaseList.md` | [before](https://clang.llvm.org/docs/SanitizerSpecialCaseList.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SanitizerSpecialCaseList.html) | | `clang/docs/OverflowBehaviorTypes.md` | [before](https://clang.llvm.org/docs/OverflowBehaviorTypes.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/OverflowBehaviorTypes.html) | | `clang/docs/LTOVisibility.md` | [before](https://clang.llvm.org/docs/LTOVisibility.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/LTOVisibility.html) | | `clang/docs/PointerAuthentication.md` | [before](https://clang.llvm.org/docs/PointerAuthentication.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/PointerAuthentication.html) | | `clang/docs/SafeStack.md` | [before](https://clang.llvm.org/docs/SafeStack.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SafeStack.html) | | `clang/docs/ShadowCallStack.md` | [before](https://clang.llvm.org/docs/ShadowCallStack.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/ShadowCallStack.html) | | `clang/docs/StructureProtection.md` | [before](https://clang.llvm.org/docs/StructureProtection.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/StructureProtection.html) | | `clang/docs/SourceBasedCodeCoverage.md` | [before](https://clang.llvm.org/docs/SourceBasedCodeCoverage.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SourceBasedCodeCoverage.html) | | `clang/docs/StandardCPlusPlusModules.md` | [before](https://clang.llvm.org/docs/StandardCPlusPlusModules.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/StandardCPlusPlusModules.html) | | `clang/docs/Modules.md` | [before](https://clang.llvm.org/docs/Modules.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/Modules.html) | | `clang/docs/MSVCCompatibility.md` | [before](https://clang.llvm.org/docs/MSVCCompatibility.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/MSVCCompatibility.html) | | `clang/docs/MisExpect.md` | [before](https://clang.llvm.org/docs/MisExpect.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/MisExpect.html) | | `clang/docs/OpenCLSupport.md` | [before](https://clang.llvm.org/docs/OpenCLSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/OpenCLSupport.html) | | `clang/docs/OpenMPSupport.md` | [before](https://clang.llvm.org/docs/OpenMPSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/OpenMPSupport.html) | | `clang/docs/SYCLSupport.md` | [before](https://clang.llvm.org/docs/SYCLSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SYCLSupport.html) | | `clang/docs/HIPSupport.md` | [before](https://clang.llvm.org/docs/HIPSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/HIPSupport.html) | | `clang/docs/HLSL/HLSLDocs.md` | [before](https://clang.llvm.org/docs/HLSL/HLSLDocs.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/HLSL/HLSLDocs.html) | | `clang/docs/ThinLTO.md` | [before](https://clang.llvm.org/docs/ThinLTO.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/ThinLTO.html) | --------- Co-authored-by: Chris B <chris.bieneman@me.com>
2026-07-09 07:16:15 -08:00
### Compatibility
A runtime is not provided in compiler-rt so one must be provided by the
compiled application or the operating system. Integrating the runtime into
the operating system should be preferred since otherwise all thread creation
and destruction would need to be intercepted by the application.
[clang][docs] Rewrite 20 selected Clang docs from reST to Markdown (#208310) Tracking issue: https://github.com/llvm/llvm-project/issues/201242 Migration guide docs: https://llvm.org/docs/SphinxQuickstartTemplate.html#markdown-migration-guidelines RFC: https://discourse.llvm.org/t/rfc-make-myst-markdown-the-llvm-docs-format-rip-rest/90840 This change was produced with rst2myst plus LLM cleanups. I manually paged through all of the linked HTML documents looking for visual artifacts, and I fixed everything I found. To reviewers: Please spot check the generated HTML below, and spot check the diff to look for artifacts. This change is too large to review everything line-by-line, but if you check 10 pages of documentation, and only find one migration bug, I hope you think that this is good enough to land. We have existing reST bugs that this fixes (mostly italic blocks that should be code font spans). ----- Links to the updated HTML for validation: | Source file | Before HTML | After HTML | |---|---|---| | `clang/docs/UsersManual.md` | [before](https://clang.llvm.org/docs/UsersManual.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/UsersManual.html) | | `clang/docs/SanitizerStats.md` | [before](https://clang.llvm.org/docs/SanitizerStats.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SanitizerStats.html) | | `clang/docs/SanitizerSpecialCaseList.md` | [before](https://clang.llvm.org/docs/SanitizerSpecialCaseList.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SanitizerSpecialCaseList.html) | | `clang/docs/OverflowBehaviorTypes.md` | [before](https://clang.llvm.org/docs/OverflowBehaviorTypes.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/OverflowBehaviorTypes.html) | | `clang/docs/LTOVisibility.md` | [before](https://clang.llvm.org/docs/LTOVisibility.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/LTOVisibility.html) | | `clang/docs/PointerAuthentication.md` | [before](https://clang.llvm.org/docs/PointerAuthentication.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/PointerAuthentication.html) | | `clang/docs/SafeStack.md` | [before](https://clang.llvm.org/docs/SafeStack.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SafeStack.html) | | `clang/docs/ShadowCallStack.md` | [before](https://clang.llvm.org/docs/ShadowCallStack.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/ShadowCallStack.html) | | `clang/docs/StructureProtection.md` | [before](https://clang.llvm.org/docs/StructureProtection.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/StructureProtection.html) | | `clang/docs/SourceBasedCodeCoverage.md` | [before](https://clang.llvm.org/docs/SourceBasedCodeCoverage.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SourceBasedCodeCoverage.html) | | `clang/docs/StandardCPlusPlusModules.md` | [before](https://clang.llvm.org/docs/StandardCPlusPlusModules.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/StandardCPlusPlusModules.html) | | `clang/docs/Modules.md` | [before](https://clang.llvm.org/docs/Modules.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/Modules.html) | | `clang/docs/MSVCCompatibility.md` | [before](https://clang.llvm.org/docs/MSVCCompatibility.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/MSVCCompatibility.html) | | `clang/docs/MisExpect.md` | [before](https://clang.llvm.org/docs/MisExpect.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/MisExpect.html) | | `clang/docs/OpenCLSupport.md` | [before](https://clang.llvm.org/docs/OpenCLSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/OpenCLSupport.html) | | `clang/docs/OpenMPSupport.md` | [before](https://clang.llvm.org/docs/OpenMPSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/OpenMPSupport.html) | | `clang/docs/SYCLSupport.md` | [before](https://clang.llvm.org/docs/SYCLSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SYCLSupport.html) | | `clang/docs/HIPSupport.md` | [before](https://clang.llvm.org/docs/HIPSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/HIPSupport.html) | | `clang/docs/HLSL/HLSLDocs.md` | [before](https://clang.llvm.org/docs/HLSL/HLSLDocs.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/HLSL/HLSLDocs.html) | | `clang/docs/ThinLTO.md` | [before](https://clang.llvm.org/docs/ThinLTO.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/ThinLTO.html) | --------- Co-authored-by: Chris B <chris.bieneman@me.com>
2026-07-09 07:16:15 -08:00
The instrumentation makes use of the platform register `x18` on AArch64,
`x3` (`gp`) on RISC-V with software shadow stack and `ssp` on RISC-V with
hardware shadow stack, which needs [Zicfiss][zicfiss] and `-fcf-protection=return`.
Users can choose between the software and hardware based shadow stack
[clang][docs] Rewrite 20 selected Clang docs from reST to Markdown (#208310) Tracking issue: https://github.com/llvm/llvm-project/issues/201242 Migration guide docs: https://llvm.org/docs/SphinxQuickstartTemplate.html#markdown-migration-guidelines RFC: https://discourse.llvm.org/t/rfc-make-myst-markdown-the-llvm-docs-format-rip-rest/90840 This change was produced with rst2myst plus LLM cleanups. I manually paged through all of the linked HTML documents looking for visual artifacts, and I fixed everything I found. To reviewers: Please spot check the generated HTML below, and spot check the diff to look for artifacts. This change is too large to review everything line-by-line, but if you check 10 pages of documentation, and only find one migration bug, I hope you think that this is good enough to land. We have existing reST bugs that this fixes (mostly italic blocks that should be code font spans). ----- Links to the updated HTML for validation: | Source file | Before HTML | After HTML | |---|---|---| | `clang/docs/UsersManual.md` | [before](https://clang.llvm.org/docs/UsersManual.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/UsersManual.html) | | `clang/docs/SanitizerStats.md` | [before](https://clang.llvm.org/docs/SanitizerStats.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SanitizerStats.html) | | `clang/docs/SanitizerSpecialCaseList.md` | [before](https://clang.llvm.org/docs/SanitizerSpecialCaseList.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SanitizerSpecialCaseList.html) | | `clang/docs/OverflowBehaviorTypes.md` | [before](https://clang.llvm.org/docs/OverflowBehaviorTypes.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/OverflowBehaviorTypes.html) | | `clang/docs/LTOVisibility.md` | [before](https://clang.llvm.org/docs/LTOVisibility.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/LTOVisibility.html) | | `clang/docs/PointerAuthentication.md` | [before](https://clang.llvm.org/docs/PointerAuthentication.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/PointerAuthentication.html) | | `clang/docs/SafeStack.md` | [before](https://clang.llvm.org/docs/SafeStack.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SafeStack.html) | | `clang/docs/ShadowCallStack.md` | [before](https://clang.llvm.org/docs/ShadowCallStack.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/ShadowCallStack.html) | | `clang/docs/StructureProtection.md` | [before](https://clang.llvm.org/docs/StructureProtection.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/StructureProtection.html) | | `clang/docs/SourceBasedCodeCoverage.md` | [before](https://clang.llvm.org/docs/SourceBasedCodeCoverage.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SourceBasedCodeCoverage.html) | | `clang/docs/StandardCPlusPlusModules.md` | [before](https://clang.llvm.org/docs/StandardCPlusPlusModules.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/StandardCPlusPlusModules.html) | | `clang/docs/Modules.md` | [before](https://clang.llvm.org/docs/Modules.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/Modules.html) | | `clang/docs/MSVCCompatibility.md` | [before](https://clang.llvm.org/docs/MSVCCompatibility.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/MSVCCompatibility.html) | | `clang/docs/MisExpect.md` | [before](https://clang.llvm.org/docs/MisExpect.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/MisExpect.html) | | `clang/docs/OpenCLSupport.md` | [before](https://clang.llvm.org/docs/OpenCLSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/OpenCLSupport.html) | | `clang/docs/OpenMPSupport.md` | [before](https://clang.llvm.org/docs/OpenMPSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/OpenMPSupport.html) | | `clang/docs/SYCLSupport.md` | [before](https://clang.llvm.org/docs/SYCLSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SYCLSupport.html) | | `clang/docs/HIPSupport.md` | [before](https://clang.llvm.org/docs/HIPSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/HIPSupport.html) | | `clang/docs/HLSL/HLSLDocs.md` | [before](https://clang.llvm.org/docs/HLSL/HLSLDocs.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/HLSL/HLSLDocs.html) | | `clang/docs/ThinLTO.md` | [before](https://clang.llvm.org/docs/ThinLTO.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/ThinLTO.html) | --------- Co-authored-by: Chris B <chris.bieneman@me.com>
2026-07-09 07:16:15 -08:00
implementation on RISC-V backend by passing `-fsanitize=shadow-call-stack`
or `Zicfiss` with `-fcf-protection=return`.
For simplicity we will refer to this as the `SCSReg`. On some platforms,
`SCSReg` is reserved, and on others, it is designated as a scratch register.
This generally means that any code that may run on the same thread as code
compiled with ShadowCallStack must either target one of the platforms whose ABI
[clang][docs] Rewrite 20 selected Clang docs from reST to Markdown (#208310) Tracking issue: https://github.com/llvm/llvm-project/issues/201242 Migration guide docs: https://llvm.org/docs/SphinxQuickstartTemplate.html#markdown-migration-guidelines RFC: https://discourse.llvm.org/t/rfc-make-myst-markdown-the-llvm-docs-format-rip-rest/90840 This change was produced with rst2myst plus LLM cleanups. I manually paged through all of the linked HTML documents looking for visual artifacts, and I fixed everything I found. To reviewers: Please spot check the generated HTML below, and spot check the diff to look for artifacts. This change is too large to review everything line-by-line, but if you check 10 pages of documentation, and only find one migration bug, I hope you think that this is good enough to land. We have existing reST bugs that this fixes (mostly italic blocks that should be code font spans). ----- Links to the updated HTML for validation: | Source file | Before HTML | After HTML | |---|---|---| | `clang/docs/UsersManual.md` | [before](https://clang.llvm.org/docs/UsersManual.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/UsersManual.html) | | `clang/docs/SanitizerStats.md` | [before](https://clang.llvm.org/docs/SanitizerStats.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SanitizerStats.html) | | `clang/docs/SanitizerSpecialCaseList.md` | [before](https://clang.llvm.org/docs/SanitizerSpecialCaseList.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SanitizerSpecialCaseList.html) | | `clang/docs/OverflowBehaviorTypes.md` | [before](https://clang.llvm.org/docs/OverflowBehaviorTypes.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/OverflowBehaviorTypes.html) | | `clang/docs/LTOVisibility.md` | [before](https://clang.llvm.org/docs/LTOVisibility.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/LTOVisibility.html) | | `clang/docs/PointerAuthentication.md` | [before](https://clang.llvm.org/docs/PointerAuthentication.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/PointerAuthentication.html) | | `clang/docs/SafeStack.md` | [before](https://clang.llvm.org/docs/SafeStack.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SafeStack.html) | | `clang/docs/ShadowCallStack.md` | [before](https://clang.llvm.org/docs/ShadowCallStack.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/ShadowCallStack.html) | | `clang/docs/StructureProtection.md` | [before](https://clang.llvm.org/docs/StructureProtection.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/StructureProtection.html) | | `clang/docs/SourceBasedCodeCoverage.md` | [before](https://clang.llvm.org/docs/SourceBasedCodeCoverage.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SourceBasedCodeCoverage.html) | | `clang/docs/StandardCPlusPlusModules.md` | [before](https://clang.llvm.org/docs/StandardCPlusPlusModules.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/StandardCPlusPlusModules.html) | | `clang/docs/Modules.md` | [before](https://clang.llvm.org/docs/Modules.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/Modules.html) | | `clang/docs/MSVCCompatibility.md` | [before](https://clang.llvm.org/docs/MSVCCompatibility.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/MSVCCompatibility.html) | | `clang/docs/MisExpect.md` | [before](https://clang.llvm.org/docs/MisExpect.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/MisExpect.html) | | `clang/docs/OpenCLSupport.md` | [before](https://clang.llvm.org/docs/OpenCLSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/OpenCLSupport.html) | | `clang/docs/OpenMPSupport.md` | [before](https://clang.llvm.org/docs/OpenMPSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/OpenMPSupport.html) | | `clang/docs/SYCLSupport.md` | [before](https://clang.llvm.org/docs/SYCLSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SYCLSupport.html) | | `clang/docs/HIPSupport.md` | [before](https://clang.llvm.org/docs/HIPSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/HIPSupport.html) | | `clang/docs/HLSL/HLSLDocs.md` | [before](https://clang.llvm.org/docs/HLSL/HLSLDocs.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/HLSL/HLSLDocs.html) | | `clang/docs/ThinLTO.md` | [before](https://clang.llvm.org/docs/ThinLTO.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/ThinLTO.html) | --------- Co-authored-by: Chris B <chris.bieneman@me.com>
2026-07-09 07:16:15 -08:00
reserves `SCSReg` (currently Android, Darwin, Fuchsia and Windows) or be
compiled with a flag to reserve that register (e.g., `-ffixed-x18`). If
absolutely necessary, code compiled without reserving the register may be run on
the same thread as code that uses ShadowCallStack by saving the register value
[clang][docs] Rewrite 20 selected Clang docs from reST to Markdown (#208310) Tracking issue: https://github.com/llvm/llvm-project/issues/201242 Migration guide docs: https://llvm.org/docs/SphinxQuickstartTemplate.html#markdown-migration-guidelines RFC: https://discourse.llvm.org/t/rfc-make-myst-markdown-the-llvm-docs-format-rip-rest/90840 This change was produced with rst2myst plus LLM cleanups. I manually paged through all of the linked HTML documents looking for visual artifacts, and I fixed everything I found. To reviewers: Please spot check the generated HTML below, and spot check the diff to look for artifacts. This change is too large to review everything line-by-line, but if you check 10 pages of documentation, and only find one migration bug, I hope you think that this is good enough to land. We have existing reST bugs that this fixes (mostly italic blocks that should be code font spans). ----- Links to the updated HTML for validation: | Source file | Before HTML | After HTML | |---|---|---| | `clang/docs/UsersManual.md` | [before](https://clang.llvm.org/docs/UsersManual.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/UsersManual.html) | | `clang/docs/SanitizerStats.md` | [before](https://clang.llvm.org/docs/SanitizerStats.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SanitizerStats.html) | | `clang/docs/SanitizerSpecialCaseList.md` | [before](https://clang.llvm.org/docs/SanitizerSpecialCaseList.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SanitizerSpecialCaseList.html) | | `clang/docs/OverflowBehaviorTypes.md` | [before](https://clang.llvm.org/docs/OverflowBehaviorTypes.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/OverflowBehaviorTypes.html) | | `clang/docs/LTOVisibility.md` | [before](https://clang.llvm.org/docs/LTOVisibility.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/LTOVisibility.html) | | `clang/docs/PointerAuthentication.md` | [before](https://clang.llvm.org/docs/PointerAuthentication.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/PointerAuthentication.html) | | `clang/docs/SafeStack.md` | [before](https://clang.llvm.org/docs/SafeStack.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SafeStack.html) | | `clang/docs/ShadowCallStack.md` | [before](https://clang.llvm.org/docs/ShadowCallStack.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/ShadowCallStack.html) | | `clang/docs/StructureProtection.md` | [before](https://clang.llvm.org/docs/StructureProtection.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/StructureProtection.html) | | `clang/docs/SourceBasedCodeCoverage.md` | [before](https://clang.llvm.org/docs/SourceBasedCodeCoverage.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SourceBasedCodeCoverage.html) | | `clang/docs/StandardCPlusPlusModules.md` | [before](https://clang.llvm.org/docs/StandardCPlusPlusModules.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/StandardCPlusPlusModules.html) | | `clang/docs/Modules.md` | [before](https://clang.llvm.org/docs/Modules.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/Modules.html) | | `clang/docs/MSVCCompatibility.md` | [before](https://clang.llvm.org/docs/MSVCCompatibility.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/MSVCCompatibility.html) | | `clang/docs/MisExpect.md` | [before](https://clang.llvm.org/docs/MisExpect.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/MisExpect.html) | | `clang/docs/OpenCLSupport.md` | [before](https://clang.llvm.org/docs/OpenCLSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/OpenCLSupport.html) | | `clang/docs/OpenMPSupport.md` | [before](https://clang.llvm.org/docs/OpenMPSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/OpenMPSupport.html) | | `clang/docs/SYCLSupport.md` | [before](https://clang.llvm.org/docs/SYCLSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SYCLSupport.html) | | `clang/docs/HIPSupport.md` | [before](https://clang.llvm.org/docs/HIPSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/HIPSupport.html) | | `clang/docs/HLSL/HLSLDocs.md` | [before](https://clang.llvm.org/docs/HLSL/HLSLDocs.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/HLSL/HLSLDocs.html) | | `clang/docs/ThinLTO.md` | [before](https://clang.llvm.org/docs/ThinLTO.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/ThinLTO.html) | --------- Co-authored-by: Chris B <chris.bieneman@me.com>
2026-07-09 07:16:15 -08:00
temporarily on the stack ([example in Android][android-example]) but this should be done with
care since it risks leaking the shadow call stack address.
Because it requires a dedicated register, the ShadowCallStack feature is
[clang][docs] Rewrite 20 selected Clang docs from reST to Markdown (#208310) Tracking issue: https://github.com/llvm/llvm-project/issues/201242 Migration guide docs: https://llvm.org/docs/SphinxQuickstartTemplate.html#markdown-migration-guidelines RFC: https://discourse.llvm.org/t/rfc-make-myst-markdown-the-llvm-docs-format-rip-rest/90840 This change was produced with rst2myst plus LLM cleanups. I manually paged through all of the linked HTML documents looking for visual artifacts, and I fixed everything I found. To reviewers: Please spot check the generated HTML below, and spot check the diff to look for artifacts. This change is too large to review everything line-by-line, but if you check 10 pages of documentation, and only find one migration bug, I hope you think that this is good enough to land. We have existing reST bugs that this fixes (mostly italic blocks that should be code font spans). ----- Links to the updated HTML for validation: | Source file | Before HTML | After HTML | |---|---|---| | `clang/docs/UsersManual.md` | [before](https://clang.llvm.org/docs/UsersManual.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/UsersManual.html) | | `clang/docs/SanitizerStats.md` | [before](https://clang.llvm.org/docs/SanitizerStats.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SanitizerStats.html) | | `clang/docs/SanitizerSpecialCaseList.md` | [before](https://clang.llvm.org/docs/SanitizerSpecialCaseList.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SanitizerSpecialCaseList.html) | | `clang/docs/OverflowBehaviorTypes.md` | [before](https://clang.llvm.org/docs/OverflowBehaviorTypes.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/OverflowBehaviorTypes.html) | | `clang/docs/LTOVisibility.md` | [before](https://clang.llvm.org/docs/LTOVisibility.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/LTOVisibility.html) | | `clang/docs/PointerAuthentication.md` | [before](https://clang.llvm.org/docs/PointerAuthentication.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/PointerAuthentication.html) | | `clang/docs/SafeStack.md` | [before](https://clang.llvm.org/docs/SafeStack.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SafeStack.html) | | `clang/docs/ShadowCallStack.md` | [before](https://clang.llvm.org/docs/ShadowCallStack.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/ShadowCallStack.html) | | `clang/docs/StructureProtection.md` | [before](https://clang.llvm.org/docs/StructureProtection.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/StructureProtection.html) | | `clang/docs/SourceBasedCodeCoverage.md` | [before](https://clang.llvm.org/docs/SourceBasedCodeCoverage.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SourceBasedCodeCoverage.html) | | `clang/docs/StandardCPlusPlusModules.md` | [before](https://clang.llvm.org/docs/StandardCPlusPlusModules.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/StandardCPlusPlusModules.html) | | `clang/docs/Modules.md` | [before](https://clang.llvm.org/docs/Modules.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/Modules.html) | | `clang/docs/MSVCCompatibility.md` | [before](https://clang.llvm.org/docs/MSVCCompatibility.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/MSVCCompatibility.html) | | `clang/docs/MisExpect.md` | [before](https://clang.llvm.org/docs/MisExpect.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/MisExpect.html) | | `clang/docs/OpenCLSupport.md` | [before](https://clang.llvm.org/docs/OpenCLSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/OpenCLSupport.html) | | `clang/docs/OpenMPSupport.md` | [before](https://clang.llvm.org/docs/OpenMPSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/OpenMPSupport.html) | | `clang/docs/SYCLSupport.md` | [before](https://clang.llvm.org/docs/SYCLSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SYCLSupport.html) | | `clang/docs/HIPSupport.md` | [before](https://clang.llvm.org/docs/HIPSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/HIPSupport.html) | | `clang/docs/HLSL/HLSLDocs.md` | [before](https://clang.llvm.org/docs/HLSL/HLSLDocs.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/HLSL/HLSLDocs.html) | | `clang/docs/ThinLTO.md` | [before](https://clang.llvm.org/docs/ThinLTO.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/ThinLTO.html) | --------- Co-authored-by: Chris B <chris.bieneman@me.com>
2026-07-09 07:16:15 -08:00
incompatible with any other feature that may use `SCSReg`. However, there is
no inherent reason why ShadowCallStack needs to use a specific register; in
principle, a platform could choose to reserve and use another register for
ShadowCallStack, but this would be incompatible with the ABI standards
published in AAPCS64 and the RISC-V psABI.
Special unwind information is required on functions that are compiled
with ShadowCallStack and that may be unwound, i.e. functions compiled with
[clang][docs] Rewrite 20 selected Clang docs from reST to Markdown (#208310) Tracking issue: https://github.com/llvm/llvm-project/issues/201242 Migration guide docs: https://llvm.org/docs/SphinxQuickstartTemplate.html#markdown-migration-guidelines RFC: https://discourse.llvm.org/t/rfc-make-myst-markdown-the-llvm-docs-format-rip-rest/90840 This change was produced with rst2myst plus LLM cleanups. I manually paged through all of the linked HTML documents looking for visual artifacts, and I fixed everything I found. To reviewers: Please spot check the generated HTML below, and spot check the diff to look for artifacts. This change is too large to review everything line-by-line, but if you check 10 pages of documentation, and only find one migration bug, I hope you think that this is good enough to land. We have existing reST bugs that this fixes (mostly italic blocks that should be code font spans). ----- Links to the updated HTML for validation: | Source file | Before HTML | After HTML | |---|---|---| | `clang/docs/UsersManual.md` | [before](https://clang.llvm.org/docs/UsersManual.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/UsersManual.html) | | `clang/docs/SanitizerStats.md` | [before](https://clang.llvm.org/docs/SanitizerStats.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SanitizerStats.html) | | `clang/docs/SanitizerSpecialCaseList.md` | [before](https://clang.llvm.org/docs/SanitizerSpecialCaseList.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SanitizerSpecialCaseList.html) | | `clang/docs/OverflowBehaviorTypes.md` | [before](https://clang.llvm.org/docs/OverflowBehaviorTypes.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/OverflowBehaviorTypes.html) | | `clang/docs/LTOVisibility.md` | [before](https://clang.llvm.org/docs/LTOVisibility.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/LTOVisibility.html) | | `clang/docs/PointerAuthentication.md` | [before](https://clang.llvm.org/docs/PointerAuthentication.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/PointerAuthentication.html) | | `clang/docs/SafeStack.md` | [before](https://clang.llvm.org/docs/SafeStack.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SafeStack.html) | | `clang/docs/ShadowCallStack.md` | [before](https://clang.llvm.org/docs/ShadowCallStack.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/ShadowCallStack.html) | | `clang/docs/StructureProtection.md` | [before](https://clang.llvm.org/docs/StructureProtection.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/StructureProtection.html) | | `clang/docs/SourceBasedCodeCoverage.md` | [before](https://clang.llvm.org/docs/SourceBasedCodeCoverage.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SourceBasedCodeCoverage.html) | | `clang/docs/StandardCPlusPlusModules.md` | [before](https://clang.llvm.org/docs/StandardCPlusPlusModules.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/StandardCPlusPlusModules.html) | | `clang/docs/Modules.md` | [before](https://clang.llvm.org/docs/Modules.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/Modules.html) | | `clang/docs/MSVCCompatibility.md` | [before](https://clang.llvm.org/docs/MSVCCompatibility.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/MSVCCompatibility.html) | | `clang/docs/MisExpect.md` | [before](https://clang.llvm.org/docs/MisExpect.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/MisExpect.html) | | `clang/docs/OpenCLSupport.md` | [before](https://clang.llvm.org/docs/OpenCLSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/OpenCLSupport.html) | | `clang/docs/OpenMPSupport.md` | [before](https://clang.llvm.org/docs/OpenMPSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/OpenMPSupport.html) | | `clang/docs/SYCLSupport.md` | [before](https://clang.llvm.org/docs/SYCLSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SYCLSupport.html) | | `clang/docs/HIPSupport.md` | [before](https://clang.llvm.org/docs/HIPSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/HIPSupport.html) | | `clang/docs/HLSL/HLSLDocs.md` | [before](https://clang.llvm.org/docs/HLSL/HLSLDocs.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/HLSL/HLSLDocs.html) | | `clang/docs/ThinLTO.md` | [before](https://clang.llvm.org/docs/ThinLTO.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/ThinLTO.html) | --------- Co-authored-by: Chris B <chris.bieneman@me.com>
2026-07-09 07:16:15 -08:00
`-fexceptions` (which is the default in C++). Some unwinders (such as the
libgcc 4.9 unwinder) do not understand this unwind info and will segfault
when encountering it. LLVM libunwind processes this unwind info correctly,
however. This means that if exceptions are used together with ShadowCallStack,
the program must use a compatible unwinder.
[clang][docs] Rewrite 20 selected Clang docs from reST to Markdown (#208310) Tracking issue: https://github.com/llvm/llvm-project/issues/201242 Migration guide docs: https://llvm.org/docs/SphinxQuickstartTemplate.html#markdown-migration-guidelines RFC: https://discourse.llvm.org/t/rfc-make-myst-markdown-the-llvm-docs-format-rip-rest/90840 This change was produced with rst2myst plus LLM cleanups. I manually paged through all of the linked HTML documents looking for visual artifacts, and I fixed everything I found. To reviewers: Please spot check the generated HTML below, and spot check the diff to look for artifacts. This change is too large to review everything line-by-line, but if you check 10 pages of documentation, and only find one migration bug, I hope you think that this is good enough to land. We have existing reST bugs that this fixes (mostly italic blocks that should be code font spans). ----- Links to the updated HTML for validation: | Source file | Before HTML | After HTML | |---|---|---| | `clang/docs/UsersManual.md` | [before](https://clang.llvm.org/docs/UsersManual.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/UsersManual.html) | | `clang/docs/SanitizerStats.md` | [before](https://clang.llvm.org/docs/SanitizerStats.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SanitizerStats.html) | | `clang/docs/SanitizerSpecialCaseList.md` | [before](https://clang.llvm.org/docs/SanitizerSpecialCaseList.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SanitizerSpecialCaseList.html) | | `clang/docs/OverflowBehaviorTypes.md` | [before](https://clang.llvm.org/docs/OverflowBehaviorTypes.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/OverflowBehaviorTypes.html) | | `clang/docs/LTOVisibility.md` | [before](https://clang.llvm.org/docs/LTOVisibility.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/LTOVisibility.html) | | `clang/docs/PointerAuthentication.md` | [before](https://clang.llvm.org/docs/PointerAuthentication.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/PointerAuthentication.html) | | `clang/docs/SafeStack.md` | [before](https://clang.llvm.org/docs/SafeStack.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SafeStack.html) | | `clang/docs/ShadowCallStack.md` | [before](https://clang.llvm.org/docs/ShadowCallStack.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/ShadowCallStack.html) | | `clang/docs/StructureProtection.md` | [before](https://clang.llvm.org/docs/StructureProtection.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/StructureProtection.html) | | `clang/docs/SourceBasedCodeCoverage.md` | [before](https://clang.llvm.org/docs/SourceBasedCodeCoverage.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SourceBasedCodeCoverage.html) | | `clang/docs/StandardCPlusPlusModules.md` | [before](https://clang.llvm.org/docs/StandardCPlusPlusModules.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/StandardCPlusPlusModules.html) | | `clang/docs/Modules.md` | [before](https://clang.llvm.org/docs/Modules.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/Modules.html) | | `clang/docs/MSVCCompatibility.md` | [before](https://clang.llvm.org/docs/MSVCCompatibility.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/MSVCCompatibility.html) | | `clang/docs/MisExpect.md` | [before](https://clang.llvm.org/docs/MisExpect.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/MisExpect.html) | | `clang/docs/OpenCLSupport.md` | [before](https://clang.llvm.org/docs/OpenCLSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/OpenCLSupport.html) | | `clang/docs/OpenMPSupport.md` | [before](https://clang.llvm.org/docs/OpenMPSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/OpenMPSupport.html) | | `clang/docs/SYCLSupport.md` | [before](https://clang.llvm.org/docs/SYCLSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SYCLSupport.html) | | `clang/docs/HIPSupport.md` | [before](https://clang.llvm.org/docs/HIPSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/HIPSupport.html) | | `clang/docs/HLSL/HLSLDocs.md` | [before](https://clang.llvm.org/docs/HLSL/HLSLDocs.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/HLSL/HLSLDocs.html) | | `clang/docs/ThinLTO.md` | [before](https://clang.llvm.org/docs/ThinLTO.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/ThinLTO.html) | --------- Co-authored-by: Chris B <chris.bieneman@me.com>
2026-07-09 07:16:15 -08:00
## Security
ShadowCallStack is intended to be a stronger alternative to
[clang][docs] Rewrite 20 selected Clang docs from reST to Markdown (#208310) Tracking issue: https://github.com/llvm/llvm-project/issues/201242 Migration guide docs: https://llvm.org/docs/SphinxQuickstartTemplate.html#markdown-migration-guidelines RFC: https://discourse.llvm.org/t/rfc-make-myst-markdown-the-llvm-docs-format-rip-rest/90840 This change was produced with rst2myst plus LLM cleanups. I manually paged through all of the linked HTML documents looking for visual artifacts, and I fixed everything I found. To reviewers: Please spot check the generated HTML below, and spot check the diff to look for artifacts. This change is too large to review everything line-by-line, but if you check 10 pages of documentation, and only find one migration bug, I hope you think that this is good enough to land. We have existing reST bugs that this fixes (mostly italic blocks that should be code font spans). ----- Links to the updated HTML for validation: | Source file | Before HTML | After HTML | |---|---|---| | `clang/docs/UsersManual.md` | [before](https://clang.llvm.org/docs/UsersManual.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/UsersManual.html) | | `clang/docs/SanitizerStats.md` | [before](https://clang.llvm.org/docs/SanitizerStats.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SanitizerStats.html) | | `clang/docs/SanitizerSpecialCaseList.md` | [before](https://clang.llvm.org/docs/SanitizerSpecialCaseList.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SanitizerSpecialCaseList.html) | | `clang/docs/OverflowBehaviorTypes.md` | [before](https://clang.llvm.org/docs/OverflowBehaviorTypes.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/OverflowBehaviorTypes.html) | | `clang/docs/LTOVisibility.md` | [before](https://clang.llvm.org/docs/LTOVisibility.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/LTOVisibility.html) | | `clang/docs/PointerAuthentication.md` | [before](https://clang.llvm.org/docs/PointerAuthentication.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/PointerAuthentication.html) | | `clang/docs/SafeStack.md` | [before](https://clang.llvm.org/docs/SafeStack.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SafeStack.html) | | `clang/docs/ShadowCallStack.md` | [before](https://clang.llvm.org/docs/ShadowCallStack.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/ShadowCallStack.html) | | `clang/docs/StructureProtection.md` | [before](https://clang.llvm.org/docs/StructureProtection.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/StructureProtection.html) | | `clang/docs/SourceBasedCodeCoverage.md` | [before](https://clang.llvm.org/docs/SourceBasedCodeCoverage.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SourceBasedCodeCoverage.html) | | `clang/docs/StandardCPlusPlusModules.md` | [before](https://clang.llvm.org/docs/StandardCPlusPlusModules.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/StandardCPlusPlusModules.html) | | `clang/docs/Modules.md` | [before](https://clang.llvm.org/docs/Modules.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/Modules.html) | | `clang/docs/MSVCCompatibility.md` | [before](https://clang.llvm.org/docs/MSVCCompatibility.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/MSVCCompatibility.html) | | `clang/docs/MisExpect.md` | [before](https://clang.llvm.org/docs/MisExpect.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/MisExpect.html) | | `clang/docs/OpenCLSupport.md` | [before](https://clang.llvm.org/docs/OpenCLSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/OpenCLSupport.html) | | `clang/docs/OpenMPSupport.md` | [before](https://clang.llvm.org/docs/OpenMPSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/OpenMPSupport.html) | | `clang/docs/SYCLSupport.md` | [before](https://clang.llvm.org/docs/SYCLSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SYCLSupport.html) | | `clang/docs/HIPSupport.md` | [before](https://clang.llvm.org/docs/HIPSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/HIPSupport.html) | | `clang/docs/HLSL/HLSLDocs.md` | [before](https://clang.llvm.org/docs/HLSL/HLSLDocs.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/HLSL/HLSLDocs.html) | | `clang/docs/ThinLTO.md` | [before](https://clang.llvm.org/docs/ThinLTO.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/ThinLTO.html) | --------- Co-authored-by: Chris B <chris.bieneman@me.com>
2026-07-09 07:16:15 -08:00
`-fstack-protector`. It protects from non-linear overflows and arbitrary
memory writes to the return address slot.
[clang][docs] Rewrite 20 selected Clang docs from reST to Markdown (#208310) Tracking issue: https://github.com/llvm/llvm-project/issues/201242 Migration guide docs: https://llvm.org/docs/SphinxQuickstartTemplate.html#markdown-migration-guidelines RFC: https://discourse.llvm.org/t/rfc-make-myst-markdown-the-llvm-docs-format-rip-rest/90840 This change was produced with rst2myst plus LLM cleanups. I manually paged through all of the linked HTML documents looking for visual artifacts, and I fixed everything I found. To reviewers: Please spot check the generated HTML below, and spot check the diff to look for artifacts. This change is too large to review everything line-by-line, but if you check 10 pages of documentation, and only find one migration bug, I hope you think that this is good enough to land. We have existing reST bugs that this fixes (mostly italic blocks that should be code font spans). ----- Links to the updated HTML for validation: | Source file | Before HTML | After HTML | |---|---|---| | `clang/docs/UsersManual.md` | [before](https://clang.llvm.org/docs/UsersManual.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/UsersManual.html) | | `clang/docs/SanitizerStats.md` | [before](https://clang.llvm.org/docs/SanitizerStats.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SanitizerStats.html) | | `clang/docs/SanitizerSpecialCaseList.md` | [before](https://clang.llvm.org/docs/SanitizerSpecialCaseList.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SanitizerSpecialCaseList.html) | | `clang/docs/OverflowBehaviorTypes.md` | [before](https://clang.llvm.org/docs/OverflowBehaviorTypes.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/OverflowBehaviorTypes.html) | | `clang/docs/LTOVisibility.md` | [before](https://clang.llvm.org/docs/LTOVisibility.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/LTOVisibility.html) | | `clang/docs/PointerAuthentication.md` | [before](https://clang.llvm.org/docs/PointerAuthentication.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/PointerAuthentication.html) | | `clang/docs/SafeStack.md` | [before](https://clang.llvm.org/docs/SafeStack.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SafeStack.html) | | `clang/docs/ShadowCallStack.md` | [before](https://clang.llvm.org/docs/ShadowCallStack.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/ShadowCallStack.html) | | `clang/docs/StructureProtection.md` | [before](https://clang.llvm.org/docs/StructureProtection.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/StructureProtection.html) | | `clang/docs/SourceBasedCodeCoverage.md` | [before](https://clang.llvm.org/docs/SourceBasedCodeCoverage.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SourceBasedCodeCoverage.html) | | `clang/docs/StandardCPlusPlusModules.md` | [before](https://clang.llvm.org/docs/StandardCPlusPlusModules.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/StandardCPlusPlusModules.html) | | `clang/docs/Modules.md` | [before](https://clang.llvm.org/docs/Modules.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/Modules.html) | | `clang/docs/MSVCCompatibility.md` | [before](https://clang.llvm.org/docs/MSVCCompatibility.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/MSVCCompatibility.html) | | `clang/docs/MisExpect.md` | [before](https://clang.llvm.org/docs/MisExpect.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/MisExpect.html) | | `clang/docs/OpenCLSupport.md` | [before](https://clang.llvm.org/docs/OpenCLSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/OpenCLSupport.html) | | `clang/docs/OpenMPSupport.md` | [before](https://clang.llvm.org/docs/OpenMPSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/OpenMPSupport.html) | | `clang/docs/SYCLSupport.md` | [before](https://clang.llvm.org/docs/SYCLSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SYCLSupport.html) | | `clang/docs/HIPSupport.md` | [before](https://clang.llvm.org/docs/HIPSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/HIPSupport.html) | | `clang/docs/HLSL/HLSLDocs.md` | [before](https://clang.llvm.org/docs/HLSL/HLSLDocs.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/HLSL/HLSLDocs.html) | | `clang/docs/ThinLTO.md` | [before](https://clang.llvm.org/docs/ThinLTO.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/ThinLTO.html) | --------- Co-authored-by: Chris B <chris.bieneman@me.com>
2026-07-09 07:16:15 -08:00
The instrumentation makes use of the `SCSReg` register to reference the shadow
call stack, meaning that references to the shadow call stack do not have
to be stored in memory. This makes it possible to implement a runtime that
avoids exposing the address of the shadow call stack to attackers that can
read arbitrary memory. However, attackers could still try to exploit side
[clang][docs] Rewrite 20 selected Clang docs from reST to Markdown (#208310) Tracking issue: https://github.com/llvm/llvm-project/issues/201242 Migration guide docs: https://llvm.org/docs/SphinxQuickstartTemplate.html#markdown-migration-guidelines RFC: https://discourse.llvm.org/t/rfc-make-myst-markdown-the-llvm-docs-format-rip-rest/90840 This change was produced with rst2myst plus LLM cleanups. I manually paged through all of the linked HTML documents looking for visual artifacts, and I fixed everything I found. To reviewers: Please spot check the generated HTML below, and spot check the diff to look for artifacts. This change is too large to review everything line-by-line, but if you check 10 pages of documentation, and only find one migration bug, I hope you think that this is good enough to land. We have existing reST bugs that this fixes (mostly italic blocks that should be code font spans). ----- Links to the updated HTML for validation: | Source file | Before HTML | After HTML | |---|---|---| | `clang/docs/UsersManual.md` | [before](https://clang.llvm.org/docs/UsersManual.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/UsersManual.html) | | `clang/docs/SanitizerStats.md` | [before](https://clang.llvm.org/docs/SanitizerStats.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SanitizerStats.html) | | `clang/docs/SanitizerSpecialCaseList.md` | [before](https://clang.llvm.org/docs/SanitizerSpecialCaseList.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SanitizerSpecialCaseList.html) | | `clang/docs/OverflowBehaviorTypes.md` | [before](https://clang.llvm.org/docs/OverflowBehaviorTypes.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/OverflowBehaviorTypes.html) | | `clang/docs/LTOVisibility.md` | [before](https://clang.llvm.org/docs/LTOVisibility.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/LTOVisibility.html) | | `clang/docs/PointerAuthentication.md` | [before](https://clang.llvm.org/docs/PointerAuthentication.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/PointerAuthentication.html) | | `clang/docs/SafeStack.md` | [before](https://clang.llvm.org/docs/SafeStack.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SafeStack.html) | | `clang/docs/ShadowCallStack.md` | [before](https://clang.llvm.org/docs/ShadowCallStack.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/ShadowCallStack.html) | | `clang/docs/StructureProtection.md` | [before](https://clang.llvm.org/docs/StructureProtection.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/StructureProtection.html) | | `clang/docs/SourceBasedCodeCoverage.md` | [before](https://clang.llvm.org/docs/SourceBasedCodeCoverage.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SourceBasedCodeCoverage.html) | | `clang/docs/StandardCPlusPlusModules.md` | [before](https://clang.llvm.org/docs/StandardCPlusPlusModules.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/StandardCPlusPlusModules.html) | | `clang/docs/Modules.md` | [before](https://clang.llvm.org/docs/Modules.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/Modules.html) | | `clang/docs/MSVCCompatibility.md` | [before](https://clang.llvm.org/docs/MSVCCompatibility.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/MSVCCompatibility.html) | | `clang/docs/MisExpect.md` | [before](https://clang.llvm.org/docs/MisExpect.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/MisExpect.html) | | `clang/docs/OpenCLSupport.md` | [before](https://clang.llvm.org/docs/OpenCLSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/OpenCLSupport.html) | | `clang/docs/OpenMPSupport.md` | [before](https://clang.llvm.org/docs/OpenMPSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/OpenMPSupport.html) | | `clang/docs/SYCLSupport.md` | [before](https://clang.llvm.org/docs/SYCLSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SYCLSupport.html) | | `clang/docs/HIPSupport.md` | [before](https://clang.llvm.org/docs/HIPSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/HIPSupport.html) | | `clang/docs/HLSL/HLSLDocs.md` | [before](https://clang.llvm.org/docs/HLSL/HLSLDocs.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/HLSL/HLSLDocs.html) | | `clang/docs/ThinLTO.md` | [before](https://clang.llvm.org/docs/ThinLTO.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/ThinLTO.html) | --------- Co-authored-by: Chris B <chris.bieneman@me.com>
2026-07-09 07:16:15 -08:00
channels exposed by the operating system [[1]][scs-cartography] [[2]][safestack-bypass]
or processor [[3]][anc]
to discover the address of the shadow call stack.
Unless care is taken when allocating the shadow call stack, it may be
possible for an attacker to guess its address using the addresses of
other allocations. Therefore, the address should be chosen to make this
difficult. One way to do this is to allocate a large guard region without
read/write permissions, randomly select a small region within it to be
used as the address of the shadow call stack and mark only that region as
read/write. This also mitigates somewhat against processor side channels.
[clang][docs] Rewrite 20 selected Clang docs from reST to Markdown (#208310) Tracking issue: https://github.com/llvm/llvm-project/issues/201242 Migration guide docs: https://llvm.org/docs/SphinxQuickstartTemplate.html#markdown-migration-guidelines RFC: https://discourse.llvm.org/t/rfc-make-myst-markdown-the-llvm-docs-format-rip-rest/90840 This change was produced with rst2myst plus LLM cleanups. I manually paged through all of the linked HTML documents looking for visual artifacts, and I fixed everything I found. To reviewers: Please spot check the generated HTML below, and spot check the diff to look for artifacts. This change is too large to review everything line-by-line, but if you check 10 pages of documentation, and only find one migration bug, I hope you think that this is good enough to land. We have existing reST bugs that this fixes (mostly italic blocks that should be code font spans). ----- Links to the updated HTML for validation: | Source file | Before HTML | After HTML | |---|---|---| | `clang/docs/UsersManual.md` | [before](https://clang.llvm.org/docs/UsersManual.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/UsersManual.html) | | `clang/docs/SanitizerStats.md` | [before](https://clang.llvm.org/docs/SanitizerStats.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SanitizerStats.html) | | `clang/docs/SanitizerSpecialCaseList.md` | [before](https://clang.llvm.org/docs/SanitizerSpecialCaseList.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SanitizerSpecialCaseList.html) | | `clang/docs/OverflowBehaviorTypes.md` | [before](https://clang.llvm.org/docs/OverflowBehaviorTypes.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/OverflowBehaviorTypes.html) | | `clang/docs/LTOVisibility.md` | [before](https://clang.llvm.org/docs/LTOVisibility.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/LTOVisibility.html) | | `clang/docs/PointerAuthentication.md` | [before](https://clang.llvm.org/docs/PointerAuthentication.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/PointerAuthentication.html) | | `clang/docs/SafeStack.md` | [before](https://clang.llvm.org/docs/SafeStack.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SafeStack.html) | | `clang/docs/ShadowCallStack.md` | [before](https://clang.llvm.org/docs/ShadowCallStack.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/ShadowCallStack.html) | | `clang/docs/StructureProtection.md` | [before](https://clang.llvm.org/docs/StructureProtection.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/StructureProtection.html) | | `clang/docs/SourceBasedCodeCoverage.md` | [before](https://clang.llvm.org/docs/SourceBasedCodeCoverage.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SourceBasedCodeCoverage.html) | | `clang/docs/StandardCPlusPlusModules.md` | [before](https://clang.llvm.org/docs/StandardCPlusPlusModules.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/StandardCPlusPlusModules.html) | | `clang/docs/Modules.md` | [before](https://clang.llvm.org/docs/Modules.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/Modules.html) | | `clang/docs/MSVCCompatibility.md` | [before](https://clang.llvm.org/docs/MSVCCompatibility.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/MSVCCompatibility.html) | | `clang/docs/MisExpect.md` | [before](https://clang.llvm.org/docs/MisExpect.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/MisExpect.html) | | `clang/docs/OpenCLSupport.md` | [before](https://clang.llvm.org/docs/OpenCLSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/OpenCLSupport.html) | | `clang/docs/OpenMPSupport.md` | [before](https://clang.llvm.org/docs/OpenMPSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/OpenMPSupport.html) | | `clang/docs/SYCLSupport.md` | [before](https://clang.llvm.org/docs/SYCLSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SYCLSupport.html) | | `clang/docs/HIPSupport.md` | [before](https://clang.llvm.org/docs/HIPSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/HIPSupport.html) | | `clang/docs/HLSL/HLSLDocs.md` | [before](https://clang.llvm.org/docs/HLSL/HLSLDocs.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/HLSL/HLSLDocs.html) | | `clang/docs/ThinLTO.md` | [before](https://clang.llvm.org/docs/ThinLTO.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/ThinLTO.html) | --------- Co-authored-by: Chris B <chris.bieneman@me.com>
2026-07-09 07:16:15 -08:00
The intent is that the Android runtime [will do this][android-will-do-this], but the platform will
first need to be [changed][android-changed] to avoid using `setrlimit(RLIMIT_AS)` to limit
memory allocations in certain processes, as this also limits the number of
guard regions that can be allocated.
The runtime will need the address of the shadow call stack in order to
deallocate it when destroying the thread. If the entire program is compiled
[clang][docs] Rewrite 20 selected Clang docs from reST to Markdown (#208310) Tracking issue: https://github.com/llvm/llvm-project/issues/201242 Migration guide docs: https://llvm.org/docs/SphinxQuickstartTemplate.html#markdown-migration-guidelines RFC: https://discourse.llvm.org/t/rfc-make-myst-markdown-the-llvm-docs-format-rip-rest/90840 This change was produced with rst2myst plus LLM cleanups. I manually paged through all of the linked HTML documents looking for visual artifacts, and I fixed everything I found. To reviewers: Please spot check the generated HTML below, and spot check the diff to look for artifacts. This change is too large to review everything line-by-line, but if you check 10 pages of documentation, and only find one migration bug, I hope you think that this is good enough to land. We have existing reST bugs that this fixes (mostly italic blocks that should be code font spans). ----- Links to the updated HTML for validation: | Source file | Before HTML | After HTML | |---|---|---| | `clang/docs/UsersManual.md` | [before](https://clang.llvm.org/docs/UsersManual.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/UsersManual.html) | | `clang/docs/SanitizerStats.md` | [before](https://clang.llvm.org/docs/SanitizerStats.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SanitizerStats.html) | | `clang/docs/SanitizerSpecialCaseList.md` | [before](https://clang.llvm.org/docs/SanitizerSpecialCaseList.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SanitizerSpecialCaseList.html) | | `clang/docs/OverflowBehaviorTypes.md` | [before](https://clang.llvm.org/docs/OverflowBehaviorTypes.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/OverflowBehaviorTypes.html) | | `clang/docs/LTOVisibility.md` | [before](https://clang.llvm.org/docs/LTOVisibility.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/LTOVisibility.html) | | `clang/docs/PointerAuthentication.md` | [before](https://clang.llvm.org/docs/PointerAuthentication.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/PointerAuthentication.html) | | `clang/docs/SafeStack.md` | [before](https://clang.llvm.org/docs/SafeStack.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SafeStack.html) | | `clang/docs/ShadowCallStack.md` | [before](https://clang.llvm.org/docs/ShadowCallStack.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/ShadowCallStack.html) | | `clang/docs/StructureProtection.md` | [before](https://clang.llvm.org/docs/StructureProtection.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/StructureProtection.html) | | `clang/docs/SourceBasedCodeCoverage.md` | [before](https://clang.llvm.org/docs/SourceBasedCodeCoverage.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SourceBasedCodeCoverage.html) | | `clang/docs/StandardCPlusPlusModules.md` | [before](https://clang.llvm.org/docs/StandardCPlusPlusModules.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/StandardCPlusPlusModules.html) | | `clang/docs/Modules.md` | [before](https://clang.llvm.org/docs/Modules.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/Modules.html) | | `clang/docs/MSVCCompatibility.md` | [before](https://clang.llvm.org/docs/MSVCCompatibility.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/MSVCCompatibility.html) | | `clang/docs/MisExpect.md` | [before](https://clang.llvm.org/docs/MisExpect.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/MisExpect.html) | | `clang/docs/OpenCLSupport.md` | [before](https://clang.llvm.org/docs/OpenCLSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/OpenCLSupport.html) | | `clang/docs/OpenMPSupport.md` | [before](https://clang.llvm.org/docs/OpenMPSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/OpenMPSupport.html) | | `clang/docs/SYCLSupport.md` | [before](https://clang.llvm.org/docs/SYCLSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SYCLSupport.html) | | `clang/docs/HIPSupport.md` | [before](https://clang.llvm.org/docs/HIPSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/HIPSupport.html) | | `clang/docs/HLSL/HLSLDocs.md` | [before](https://clang.llvm.org/docs/HLSL/HLSLDocs.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/HLSL/HLSLDocs.html) | | `clang/docs/ThinLTO.md` | [before](https://clang.llvm.org/docs/ThinLTO.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/ThinLTO.html) | --------- Co-authored-by: Chris B <chris.bieneman@me.com>
2026-07-09 07:16:15 -08:00
with `SCSReg` reserved, this is trivial: the address can be derived from the
value stored in `SCSReg` (e.g. by masking out the lower bits). If a guard
region is used, the address of the start of the guard region could then be
stored at the start of the shadow call stack itself. But if it is possible
[clang][docs] Rewrite 20 selected Clang docs from reST to Markdown (#208310) Tracking issue: https://github.com/llvm/llvm-project/issues/201242 Migration guide docs: https://llvm.org/docs/SphinxQuickstartTemplate.html#markdown-migration-guidelines RFC: https://discourse.llvm.org/t/rfc-make-myst-markdown-the-llvm-docs-format-rip-rest/90840 This change was produced with rst2myst plus LLM cleanups. I manually paged through all of the linked HTML documents looking for visual artifacts, and I fixed everything I found. To reviewers: Please spot check the generated HTML below, and spot check the diff to look for artifacts. This change is too large to review everything line-by-line, but if you check 10 pages of documentation, and only find one migration bug, I hope you think that this is good enough to land. We have existing reST bugs that this fixes (mostly italic blocks that should be code font spans). ----- Links to the updated HTML for validation: | Source file | Before HTML | After HTML | |---|---|---| | `clang/docs/UsersManual.md` | [before](https://clang.llvm.org/docs/UsersManual.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/UsersManual.html) | | `clang/docs/SanitizerStats.md` | [before](https://clang.llvm.org/docs/SanitizerStats.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SanitizerStats.html) | | `clang/docs/SanitizerSpecialCaseList.md` | [before](https://clang.llvm.org/docs/SanitizerSpecialCaseList.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SanitizerSpecialCaseList.html) | | `clang/docs/OverflowBehaviorTypes.md` | [before](https://clang.llvm.org/docs/OverflowBehaviorTypes.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/OverflowBehaviorTypes.html) | | `clang/docs/LTOVisibility.md` | [before](https://clang.llvm.org/docs/LTOVisibility.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/LTOVisibility.html) | | `clang/docs/PointerAuthentication.md` | [before](https://clang.llvm.org/docs/PointerAuthentication.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/PointerAuthentication.html) | | `clang/docs/SafeStack.md` | [before](https://clang.llvm.org/docs/SafeStack.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SafeStack.html) | | `clang/docs/ShadowCallStack.md` | [before](https://clang.llvm.org/docs/ShadowCallStack.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/ShadowCallStack.html) | | `clang/docs/StructureProtection.md` | [before](https://clang.llvm.org/docs/StructureProtection.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/StructureProtection.html) | | `clang/docs/SourceBasedCodeCoverage.md` | [before](https://clang.llvm.org/docs/SourceBasedCodeCoverage.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SourceBasedCodeCoverage.html) | | `clang/docs/StandardCPlusPlusModules.md` | [before](https://clang.llvm.org/docs/StandardCPlusPlusModules.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/StandardCPlusPlusModules.html) | | `clang/docs/Modules.md` | [before](https://clang.llvm.org/docs/Modules.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/Modules.html) | | `clang/docs/MSVCCompatibility.md` | [before](https://clang.llvm.org/docs/MSVCCompatibility.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/MSVCCompatibility.html) | | `clang/docs/MisExpect.md` | [before](https://clang.llvm.org/docs/MisExpect.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/MisExpect.html) | | `clang/docs/OpenCLSupport.md` | [before](https://clang.llvm.org/docs/OpenCLSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/OpenCLSupport.html) | | `clang/docs/OpenMPSupport.md` | [before](https://clang.llvm.org/docs/OpenMPSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/OpenMPSupport.html) | | `clang/docs/SYCLSupport.md` | [before](https://clang.llvm.org/docs/SYCLSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SYCLSupport.html) | | `clang/docs/HIPSupport.md` | [before](https://clang.llvm.org/docs/HIPSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/HIPSupport.html) | | `clang/docs/HLSL/HLSLDocs.md` | [before](https://clang.llvm.org/docs/HLSL/HLSLDocs.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/HLSL/HLSLDocs.html) | | `clang/docs/ThinLTO.md` | [before](https://clang.llvm.org/docs/ThinLTO.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/ThinLTO.html) | --------- Co-authored-by: Chris B <chris.bieneman@me.com>
2026-07-09 07:16:15 -08:00
for code compiled without reserving `SCSReg` to run on a thread managed by the
runtime, which is the case on Android for example, the address must be stored
somewhere else instead. On Android we store the address of the start of the
guard region in TLS and deallocate the entire guard region including the
shadow call stack at thread exit. This is considered acceptable given that
the address of the start of the guard region is already somewhat guessable.
One way in which the address of the shadow call stack could leak is in the
[clang][docs] Rewrite 20 selected Clang docs from reST to Markdown (#208310) Tracking issue: https://github.com/llvm/llvm-project/issues/201242 Migration guide docs: https://llvm.org/docs/SphinxQuickstartTemplate.html#markdown-migration-guidelines RFC: https://discourse.llvm.org/t/rfc-make-myst-markdown-the-llvm-docs-format-rip-rest/90840 This change was produced with rst2myst plus LLM cleanups. I manually paged through all of the linked HTML documents looking for visual artifacts, and I fixed everything I found. To reviewers: Please spot check the generated HTML below, and spot check the diff to look for artifacts. This change is too large to review everything line-by-line, but if you check 10 pages of documentation, and only find one migration bug, I hope you think that this is good enough to land. We have existing reST bugs that this fixes (mostly italic blocks that should be code font spans). ----- Links to the updated HTML for validation: | Source file | Before HTML | After HTML | |---|---|---| | `clang/docs/UsersManual.md` | [before](https://clang.llvm.org/docs/UsersManual.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/UsersManual.html) | | `clang/docs/SanitizerStats.md` | [before](https://clang.llvm.org/docs/SanitizerStats.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SanitizerStats.html) | | `clang/docs/SanitizerSpecialCaseList.md` | [before](https://clang.llvm.org/docs/SanitizerSpecialCaseList.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SanitizerSpecialCaseList.html) | | `clang/docs/OverflowBehaviorTypes.md` | [before](https://clang.llvm.org/docs/OverflowBehaviorTypes.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/OverflowBehaviorTypes.html) | | `clang/docs/LTOVisibility.md` | [before](https://clang.llvm.org/docs/LTOVisibility.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/LTOVisibility.html) | | `clang/docs/PointerAuthentication.md` | [before](https://clang.llvm.org/docs/PointerAuthentication.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/PointerAuthentication.html) | | `clang/docs/SafeStack.md` | [before](https://clang.llvm.org/docs/SafeStack.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SafeStack.html) | | `clang/docs/ShadowCallStack.md` | [before](https://clang.llvm.org/docs/ShadowCallStack.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/ShadowCallStack.html) | | `clang/docs/StructureProtection.md` | [before](https://clang.llvm.org/docs/StructureProtection.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/StructureProtection.html) | | `clang/docs/SourceBasedCodeCoverage.md` | [before](https://clang.llvm.org/docs/SourceBasedCodeCoverage.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SourceBasedCodeCoverage.html) | | `clang/docs/StandardCPlusPlusModules.md` | [before](https://clang.llvm.org/docs/StandardCPlusPlusModules.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/StandardCPlusPlusModules.html) | | `clang/docs/Modules.md` | [before](https://clang.llvm.org/docs/Modules.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/Modules.html) | | `clang/docs/MSVCCompatibility.md` | [before](https://clang.llvm.org/docs/MSVCCompatibility.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/MSVCCompatibility.html) | | `clang/docs/MisExpect.md` | [before](https://clang.llvm.org/docs/MisExpect.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/MisExpect.html) | | `clang/docs/OpenCLSupport.md` | [before](https://clang.llvm.org/docs/OpenCLSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/OpenCLSupport.html) | | `clang/docs/OpenMPSupport.md` | [before](https://clang.llvm.org/docs/OpenMPSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/OpenMPSupport.html) | | `clang/docs/SYCLSupport.md` | [before](https://clang.llvm.org/docs/SYCLSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SYCLSupport.html) | | `clang/docs/HIPSupport.md` | [before](https://clang.llvm.org/docs/HIPSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/HIPSupport.html) | | `clang/docs/HLSL/HLSLDocs.md` | [before](https://clang.llvm.org/docs/HLSL/HLSLDocs.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/HLSL/HLSLDocs.html) | | `clang/docs/ThinLTO.md` | [before](https://clang.llvm.org/docs/ThinLTO.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/ThinLTO.html) | --------- Co-authored-by: Chris B <chris.bieneman@me.com>
2026-07-09 07:16:15 -08:00
`jmp_buf` data structure used by `setjmp` and `longjmp`. The Android
runtime [avoids this][android-avoids-this] by only storing the low bits of `SCSReg` in the
`jmp_buf`, which requires the address of the shadow call stack to be
aligned to its size.
[clang][docs] Rewrite 20 selected Clang docs from reST to Markdown (#208310) Tracking issue: https://github.com/llvm/llvm-project/issues/201242 Migration guide docs: https://llvm.org/docs/SphinxQuickstartTemplate.html#markdown-migration-guidelines RFC: https://discourse.llvm.org/t/rfc-make-myst-markdown-the-llvm-docs-format-rip-rest/90840 This change was produced with rst2myst plus LLM cleanups. I manually paged through all of the linked HTML documents looking for visual artifacts, and I fixed everything I found. To reviewers: Please spot check the generated HTML below, and spot check the diff to look for artifacts. This change is too large to review everything line-by-line, but if you check 10 pages of documentation, and only find one migration bug, I hope you think that this is good enough to land. We have existing reST bugs that this fixes (mostly italic blocks that should be code font spans). ----- Links to the updated HTML for validation: | Source file | Before HTML | After HTML | |---|---|---| | `clang/docs/UsersManual.md` | [before](https://clang.llvm.org/docs/UsersManual.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/UsersManual.html) | | `clang/docs/SanitizerStats.md` | [before](https://clang.llvm.org/docs/SanitizerStats.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SanitizerStats.html) | | `clang/docs/SanitizerSpecialCaseList.md` | [before](https://clang.llvm.org/docs/SanitizerSpecialCaseList.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SanitizerSpecialCaseList.html) | | `clang/docs/OverflowBehaviorTypes.md` | [before](https://clang.llvm.org/docs/OverflowBehaviorTypes.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/OverflowBehaviorTypes.html) | | `clang/docs/LTOVisibility.md` | [before](https://clang.llvm.org/docs/LTOVisibility.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/LTOVisibility.html) | | `clang/docs/PointerAuthentication.md` | [before](https://clang.llvm.org/docs/PointerAuthentication.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/PointerAuthentication.html) | | `clang/docs/SafeStack.md` | [before](https://clang.llvm.org/docs/SafeStack.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SafeStack.html) | | `clang/docs/ShadowCallStack.md` | [before](https://clang.llvm.org/docs/ShadowCallStack.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/ShadowCallStack.html) | | `clang/docs/StructureProtection.md` | [before](https://clang.llvm.org/docs/StructureProtection.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/StructureProtection.html) | | `clang/docs/SourceBasedCodeCoverage.md` | [before](https://clang.llvm.org/docs/SourceBasedCodeCoverage.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SourceBasedCodeCoverage.html) | | `clang/docs/StandardCPlusPlusModules.md` | [before](https://clang.llvm.org/docs/StandardCPlusPlusModules.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/StandardCPlusPlusModules.html) | | `clang/docs/Modules.md` | [before](https://clang.llvm.org/docs/Modules.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/Modules.html) | | `clang/docs/MSVCCompatibility.md` | [before](https://clang.llvm.org/docs/MSVCCompatibility.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/MSVCCompatibility.html) | | `clang/docs/MisExpect.md` | [before](https://clang.llvm.org/docs/MisExpect.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/MisExpect.html) | | `clang/docs/OpenCLSupport.md` | [before](https://clang.llvm.org/docs/OpenCLSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/OpenCLSupport.html) | | `clang/docs/OpenMPSupport.md` | [before](https://clang.llvm.org/docs/OpenMPSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/OpenMPSupport.html) | | `clang/docs/SYCLSupport.md` | [before](https://clang.llvm.org/docs/SYCLSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SYCLSupport.html) | | `clang/docs/HIPSupport.md` | [before](https://clang.llvm.org/docs/HIPSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/HIPSupport.html) | | `clang/docs/HLSL/HLSLDocs.md` | [before](https://clang.llvm.org/docs/HLSL/HLSLDocs.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/HLSL/HLSLDocs.html) | | `clang/docs/ThinLTO.md` | [before](https://clang.llvm.org/docs/ThinLTO.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/ThinLTO.html) | --------- Co-authored-by: Chris B <chris.bieneman@me.com>
2026-07-09 07:16:15 -08:00
The architecture's call and return instructions (`bl` and `ret`) operate on
a register rather than the stack, which means that leaf functions are generally
protected from return address overwrites even without ShadowCallStack.
[clang][docs] Rewrite 20 selected Clang docs from reST to Markdown (#208310) Tracking issue: https://github.com/llvm/llvm-project/issues/201242 Migration guide docs: https://llvm.org/docs/SphinxQuickstartTemplate.html#markdown-migration-guidelines RFC: https://discourse.llvm.org/t/rfc-make-myst-markdown-the-llvm-docs-format-rip-rest/90840 This change was produced with rst2myst plus LLM cleanups. I manually paged through all of the linked HTML documents looking for visual artifacts, and I fixed everything I found. To reviewers: Please spot check the generated HTML below, and spot check the diff to look for artifacts. This change is too large to review everything line-by-line, but if you check 10 pages of documentation, and only find one migration bug, I hope you think that this is good enough to land. We have existing reST bugs that this fixes (mostly italic blocks that should be code font spans). ----- Links to the updated HTML for validation: | Source file | Before HTML | After HTML | |---|---|---| | `clang/docs/UsersManual.md` | [before](https://clang.llvm.org/docs/UsersManual.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/UsersManual.html) | | `clang/docs/SanitizerStats.md` | [before](https://clang.llvm.org/docs/SanitizerStats.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SanitizerStats.html) | | `clang/docs/SanitizerSpecialCaseList.md` | [before](https://clang.llvm.org/docs/SanitizerSpecialCaseList.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SanitizerSpecialCaseList.html) | | `clang/docs/OverflowBehaviorTypes.md` | [before](https://clang.llvm.org/docs/OverflowBehaviorTypes.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/OverflowBehaviorTypes.html) | | `clang/docs/LTOVisibility.md` | [before](https://clang.llvm.org/docs/LTOVisibility.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/LTOVisibility.html) | | `clang/docs/PointerAuthentication.md` | [before](https://clang.llvm.org/docs/PointerAuthentication.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/PointerAuthentication.html) | | `clang/docs/SafeStack.md` | [before](https://clang.llvm.org/docs/SafeStack.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SafeStack.html) | | `clang/docs/ShadowCallStack.md` | [before](https://clang.llvm.org/docs/ShadowCallStack.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/ShadowCallStack.html) | | `clang/docs/StructureProtection.md` | [before](https://clang.llvm.org/docs/StructureProtection.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/StructureProtection.html) | | `clang/docs/SourceBasedCodeCoverage.md` | [before](https://clang.llvm.org/docs/SourceBasedCodeCoverage.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SourceBasedCodeCoverage.html) | | `clang/docs/StandardCPlusPlusModules.md` | [before](https://clang.llvm.org/docs/StandardCPlusPlusModules.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/StandardCPlusPlusModules.html) | | `clang/docs/Modules.md` | [before](https://clang.llvm.org/docs/Modules.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/Modules.html) | | `clang/docs/MSVCCompatibility.md` | [before](https://clang.llvm.org/docs/MSVCCompatibility.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/MSVCCompatibility.html) | | `clang/docs/MisExpect.md` | [before](https://clang.llvm.org/docs/MisExpect.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/MisExpect.html) | | `clang/docs/OpenCLSupport.md` | [before](https://clang.llvm.org/docs/OpenCLSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/OpenCLSupport.html) | | `clang/docs/OpenMPSupport.md` | [before](https://clang.llvm.org/docs/OpenMPSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/OpenMPSupport.html) | | `clang/docs/SYCLSupport.md` | [before](https://clang.llvm.org/docs/SYCLSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SYCLSupport.html) | | `clang/docs/HIPSupport.md` | [before](https://clang.llvm.org/docs/HIPSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/HIPSupport.html) | | `clang/docs/HLSL/HLSLDocs.md` | [before](https://clang.llvm.org/docs/HLSL/HLSLDocs.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/HLSL/HLSLDocs.html) | | `clang/docs/ThinLTO.md` | [before](https://clang.llvm.org/docs/ThinLTO.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/ThinLTO.html) | --------- Co-authored-by: Chris B <chris.bieneman@me.com>
2026-07-09 07:16:15 -08:00
## Usage
[clang][docs] Rewrite 20 selected Clang docs from reST to Markdown (#208310) Tracking issue: https://github.com/llvm/llvm-project/issues/201242 Migration guide docs: https://llvm.org/docs/SphinxQuickstartTemplate.html#markdown-migration-guidelines RFC: https://discourse.llvm.org/t/rfc-make-myst-markdown-the-llvm-docs-format-rip-rest/90840 This change was produced with rst2myst plus LLM cleanups. I manually paged through all of the linked HTML documents looking for visual artifacts, and I fixed everything I found. To reviewers: Please spot check the generated HTML below, and spot check the diff to look for artifacts. This change is too large to review everything line-by-line, but if you check 10 pages of documentation, and only find one migration bug, I hope you think that this is good enough to land. We have existing reST bugs that this fixes (mostly italic blocks that should be code font spans). ----- Links to the updated HTML for validation: | Source file | Before HTML | After HTML | |---|---|---| | `clang/docs/UsersManual.md` | [before](https://clang.llvm.org/docs/UsersManual.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/UsersManual.html) | | `clang/docs/SanitizerStats.md` | [before](https://clang.llvm.org/docs/SanitizerStats.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SanitizerStats.html) | | `clang/docs/SanitizerSpecialCaseList.md` | [before](https://clang.llvm.org/docs/SanitizerSpecialCaseList.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SanitizerSpecialCaseList.html) | | `clang/docs/OverflowBehaviorTypes.md` | [before](https://clang.llvm.org/docs/OverflowBehaviorTypes.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/OverflowBehaviorTypes.html) | | `clang/docs/LTOVisibility.md` | [before](https://clang.llvm.org/docs/LTOVisibility.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/LTOVisibility.html) | | `clang/docs/PointerAuthentication.md` | [before](https://clang.llvm.org/docs/PointerAuthentication.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/PointerAuthentication.html) | | `clang/docs/SafeStack.md` | [before](https://clang.llvm.org/docs/SafeStack.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SafeStack.html) | | `clang/docs/ShadowCallStack.md` | [before](https://clang.llvm.org/docs/ShadowCallStack.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/ShadowCallStack.html) | | `clang/docs/StructureProtection.md` | [before](https://clang.llvm.org/docs/StructureProtection.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/StructureProtection.html) | | `clang/docs/SourceBasedCodeCoverage.md` | [before](https://clang.llvm.org/docs/SourceBasedCodeCoverage.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SourceBasedCodeCoverage.html) | | `clang/docs/StandardCPlusPlusModules.md` | [before](https://clang.llvm.org/docs/StandardCPlusPlusModules.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/StandardCPlusPlusModules.html) | | `clang/docs/Modules.md` | [before](https://clang.llvm.org/docs/Modules.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/Modules.html) | | `clang/docs/MSVCCompatibility.md` | [before](https://clang.llvm.org/docs/MSVCCompatibility.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/MSVCCompatibility.html) | | `clang/docs/MisExpect.md` | [before](https://clang.llvm.org/docs/MisExpect.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/MisExpect.html) | | `clang/docs/OpenCLSupport.md` | [before](https://clang.llvm.org/docs/OpenCLSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/OpenCLSupport.html) | | `clang/docs/OpenMPSupport.md` | [before](https://clang.llvm.org/docs/OpenMPSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/OpenMPSupport.html) | | `clang/docs/SYCLSupport.md` | [before](https://clang.llvm.org/docs/SYCLSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SYCLSupport.html) | | `clang/docs/HIPSupport.md` | [before](https://clang.llvm.org/docs/HIPSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/HIPSupport.html) | | `clang/docs/HLSL/HLSLDocs.md` | [before](https://clang.llvm.org/docs/HLSL/HLSLDocs.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/HLSL/HLSLDocs.html) | | `clang/docs/ThinLTO.md` | [before](https://clang.llvm.org/docs/ThinLTO.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/ThinLTO.html) | --------- Co-authored-by: Chris B <chris.bieneman@me.com>
2026-07-09 07:16:15 -08:00
To enable ShadowCallStack, just pass the `-fsanitize=shadow-call-stack` flag
to both compile and link command lines. On aarch64, you also need to pass
[clang][docs] Rewrite 20 selected Clang docs from reST to Markdown (#208310) Tracking issue: https://github.com/llvm/llvm-project/issues/201242 Migration guide docs: https://llvm.org/docs/SphinxQuickstartTemplate.html#markdown-migration-guidelines RFC: https://discourse.llvm.org/t/rfc-make-myst-markdown-the-llvm-docs-format-rip-rest/90840 This change was produced with rst2myst plus LLM cleanups. I manually paged through all of the linked HTML documents looking for visual artifacts, and I fixed everything I found. To reviewers: Please spot check the generated HTML below, and spot check the diff to look for artifacts. This change is too large to review everything line-by-line, but if you check 10 pages of documentation, and only find one migration bug, I hope you think that this is good enough to land. We have existing reST bugs that this fixes (mostly italic blocks that should be code font spans). ----- Links to the updated HTML for validation: | Source file | Before HTML | After HTML | |---|---|---| | `clang/docs/UsersManual.md` | [before](https://clang.llvm.org/docs/UsersManual.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/UsersManual.html) | | `clang/docs/SanitizerStats.md` | [before](https://clang.llvm.org/docs/SanitizerStats.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SanitizerStats.html) | | `clang/docs/SanitizerSpecialCaseList.md` | [before](https://clang.llvm.org/docs/SanitizerSpecialCaseList.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SanitizerSpecialCaseList.html) | | `clang/docs/OverflowBehaviorTypes.md` | [before](https://clang.llvm.org/docs/OverflowBehaviorTypes.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/OverflowBehaviorTypes.html) | | `clang/docs/LTOVisibility.md` | [before](https://clang.llvm.org/docs/LTOVisibility.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/LTOVisibility.html) | | `clang/docs/PointerAuthentication.md` | [before](https://clang.llvm.org/docs/PointerAuthentication.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/PointerAuthentication.html) | | `clang/docs/SafeStack.md` | [before](https://clang.llvm.org/docs/SafeStack.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SafeStack.html) | | `clang/docs/ShadowCallStack.md` | [before](https://clang.llvm.org/docs/ShadowCallStack.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/ShadowCallStack.html) | | `clang/docs/StructureProtection.md` | [before](https://clang.llvm.org/docs/StructureProtection.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/StructureProtection.html) | | `clang/docs/SourceBasedCodeCoverage.md` | [before](https://clang.llvm.org/docs/SourceBasedCodeCoverage.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SourceBasedCodeCoverage.html) | | `clang/docs/StandardCPlusPlusModules.md` | [before](https://clang.llvm.org/docs/StandardCPlusPlusModules.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/StandardCPlusPlusModules.html) | | `clang/docs/Modules.md` | [before](https://clang.llvm.org/docs/Modules.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/Modules.html) | | `clang/docs/MSVCCompatibility.md` | [before](https://clang.llvm.org/docs/MSVCCompatibility.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/MSVCCompatibility.html) | | `clang/docs/MisExpect.md` | [before](https://clang.llvm.org/docs/MisExpect.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/MisExpect.html) | | `clang/docs/OpenCLSupport.md` | [before](https://clang.llvm.org/docs/OpenCLSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/OpenCLSupport.html) | | `clang/docs/OpenMPSupport.md` | [before](https://clang.llvm.org/docs/OpenMPSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/OpenMPSupport.html) | | `clang/docs/SYCLSupport.md` | [before](https://clang.llvm.org/docs/SYCLSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SYCLSupport.html) | | `clang/docs/HIPSupport.md` | [before](https://clang.llvm.org/docs/HIPSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/HIPSupport.html) | | `clang/docs/HLSL/HLSLDocs.md` | [before](https://clang.llvm.org/docs/HLSL/HLSLDocs.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/HLSL/HLSLDocs.html) | | `clang/docs/ThinLTO.md` | [before](https://clang.llvm.org/docs/ThinLTO.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/ThinLTO.html) | --------- Co-authored-by: Chris B <chris.bieneman@me.com>
2026-07-09 07:16:15 -08:00
`-ffixed-x18` unless your target already reserves `x18`. No additional flags
need to be passed on RISC-V because the software based shadow stack uses
[clang][docs] Rewrite 20 selected Clang docs from reST to Markdown (#208310) Tracking issue: https://github.com/llvm/llvm-project/issues/201242 Migration guide docs: https://llvm.org/docs/SphinxQuickstartTemplate.html#markdown-migration-guidelines RFC: https://discourse.llvm.org/t/rfc-make-myst-markdown-the-llvm-docs-format-rip-rest/90840 This change was produced with rst2myst plus LLM cleanups. I manually paged through all of the linked HTML documents looking for visual artifacts, and I fixed everything I found. To reviewers: Please spot check the generated HTML below, and spot check the diff to look for artifacts. This change is too large to review everything line-by-line, but if you check 10 pages of documentation, and only find one migration bug, I hope you think that this is good enough to land. We have existing reST bugs that this fixes (mostly italic blocks that should be code font spans). ----- Links to the updated HTML for validation: | Source file | Before HTML | After HTML | |---|---|---| | `clang/docs/UsersManual.md` | [before](https://clang.llvm.org/docs/UsersManual.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/UsersManual.html) | | `clang/docs/SanitizerStats.md` | [before](https://clang.llvm.org/docs/SanitizerStats.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SanitizerStats.html) | | `clang/docs/SanitizerSpecialCaseList.md` | [before](https://clang.llvm.org/docs/SanitizerSpecialCaseList.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SanitizerSpecialCaseList.html) | | `clang/docs/OverflowBehaviorTypes.md` | [before](https://clang.llvm.org/docs/OverflowBehaviorTypes.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/OverflowBehaviorTypes.html) | | `clang/docs/LTOVisibility.md` | [before](https://clang.llvm.org/docs/LTOVisibility.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/LTOVisibility.html) | | `clang/docs/PointerAuthentication.md` | [before](https://clang.llvm.org/docs/PointerAuthentication.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/PointerAuthentication.html) | | `clang/docs/SafeStack.md` | [before](https://clang.llvm.org/docs/SafeStack.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SafeStack.html) | | `clang/docs/ShadowCallStack.md` | [before](https://clang.llvm.org/docs/ShadowCallStack.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/ShadowCallStack.html) | | `clang/docs/StructureProtection.md` | [before](https://clang.llvm.org/docs/StructureProtection.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/StructureProtection.html) | | `clang/docs/SourceBasedCodeCoverage.md` | [before](https://clang.llvm.org/docs/SourceBasedCodeCoverage.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SourceBasedCodeCoverage.html) | | `clang/docs/StandardCPlusPlusModules.md` | [before](https://clang.llvm.org/docs/StandardCPlusPlusModules.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/StandardCPlusPlusModules.html) | | `clang/docs/Modules.md` | [before](https://clang.llvm.org/docs/Modules.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/Modules.html) | | `clang/docs/MSVCCompatibility.md` | [before](https://clang.llvm.org/docs/MSVCCompatibility.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/MSVCCompatibility.html) | | `clang/docs/MisExpect.md` | [before](https://clang.llvm.org/docs/MisExpect.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/MisExpect.html) | | `clang/docs/OpenCLSupport.md` | [before](https://clang.llvm.org/docs/OpenCLSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/OpenCLSupport.html) | | `clang/docs/OpenMPSupport.md` | [before](https://clang.llvm.org/docs/OpenMPSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/OpenMPSupport.html) | | `clang/docs/SYCLSupport.md` | [before](https://clang.llvm.org/docs/SYCLSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SYCLSupport.html) | | `clang/docs/HIPSupport.md` | [before](https://clang.llvm.org/docs/HIPSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/HIPSupport.html) | | `clang/docs/HLSL/HLSLDocs.md` | [before](https://clang.llvm.org/docs/HLSL/HLSLDocs.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/HLSL/HLSLDocs.html) | | `clang/docs/ThinLTO.md` | [before](https://clang.llvm.org/docs/ThinLTO.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/ThinLTO.html) | --------- Co-authored-by: Chris B <chris.bieneman@me.com>
2026-07-09 07:16:15 -08:00
`x3` (`gp`), which is always reserved, and the hardware based shadow call
stack uses a dedicated register, `ssp`.
However, it is important to disable GP relaxation in the linker when using the
software based shadow call stack on RISC-V. This can be done with the
[clang][docs] Rewrite 20 selected Clang docs from reST to Markdown (#208310) Tracking issue: https://github.com/llvm/llvm-project/issues/201242 Migration guide docs: https://llvm.org/docs/SphinxQuickstartTemplate.html#markdown-migration-guidelines RFC: https://discourse.llvm.org/t/rfc-make-myst-markdown-the-llvm-docs-format-rip-rest/90840 This change was produced with rst2myst plus LLM cleanups. I manually paged through all of the linked HTML documents looking for visual artifacts, and I fixed everything I found. To reviewers: Please spot check the generated HTML below, and spot check the diff to look for artifacts. This change is too large to review everything line-by-line, but if you check 10 pages of documentation, and only find one migration bug, I hope you think that this is good enough to land. We have existing reST bugs that this fixes (mostly italic blocks that should be code font spans). ----- Links to the updated HTML for validation: | Source file | Before HTML | After HTML | |---|---|---| | `clang/docs/UsersManual.md` | [before](https://clang.llvm.org/docs/UsersManual.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/UsersManual.html) | | `clang/docs/SanitizerStats.md` | [before](https://clang.llvm.org/docs/SanitizerStats.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SanitizerStats.html) | | `clang/docs/SanitizerSpecialCaseList.md` | [before](https://clang.llvm.org/docs/SanitizerSpecialCaseList.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SanitizerSpecialCaseList.html) | | `clang/docs/OverflowBehaviorTypes.md` | [before](https://clang.llvm.org/docs/OverflowBehaviorTypes.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/OverflowBehaviorTypes.html) | | `clang/docs/LTOVisibility.md` | [before](https://clang.llvm.org/docs/LTOVisibility.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/LTOVisibility.html) | | `clang/docs/PointerAuthentication.md` | [before](https://clang.llvm.org/docs/PointerAuthentication.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/PointerAuthentication.html) | | `clang/docs/SafeStack.md` | [before](https://clang.llvm.org/docs/SafeStack.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SafeStack.html) | | `clang/docs/ShadowCallStack.md` | [before](https://clang.llvm.org/docs/ShadowCallStack.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/ShadowCallStack.html) | | `clang/docs/StructureProtection.md` | [before](https://clang.llvm.org/docs/StructureProtection.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/StructureProtection.html) | | `clang/docs/SourceBasedCodeCoverage.md` | [before](https://clang.llvm.org/docs/SourceBasedCodeCoverage.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SourceBasedCodeCoverage.html) | | `clang/docs/StandardCPlusPlusModules.md` | [before](https://clang.llvm.org/docs/StandardCPlusPlusModules.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/StandardCPlusPlusModules.html) | | `clang/docs/Modules.md` | [before](https://clang.llvm.org/docs/Modules.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/Modules.html) | | `clang/docs/MSVCCompatibility.md` | [before](https://clang.llvm.org/docs/MSVCCompatibility.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/MSVCCompatibility.html) | | `clang/docs/MisExpect.md` | [before](https://clang.llvm.org/docs/MisExpect.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/MisExpect.html) | | `clang/docs/OpenCLSupport.md` | [before](https://clang.llvm.org/docs/OpenCLSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/OpenCLSupport.html) | | `clang/docs/OpenMPSupport.md` | [before](https://clang.llvm.org/docs/OpenMPSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/OpenMPSupport.html) | | `clang/docs/SYCLSupport.md` | [before](https://clang.llvm.org/docs/SYCLSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SYCLSupport.html) | | `clang/docs/HIPSupport.md` | [before](https://clang.llvm.org/docs/HIPSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/HIPSupport.html) | | `clang/docs/HLSL/HLSLDocs.md` | [before](https://clang.llvm.org/docs/HLSL/HLSLDocs.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/HLSL/HLSLDocs.html) | | `clang/docs/ThinLTO.md` | [before](https://clang.llvm.org/docs/ThinLTO.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/ThinLTO.html) | --------- Co-authored-by: Chris B <chris.bieneman@me.com>
2026-07-09 07:16:15 -08:00
`--no-relax-gp` flag in GNU ld, and is off by default in LLD.
[clang][docs] Rewrite 20 selected Clang docs from reST to Markdown (#208310) Tracking issue: https://github.com/llvm/llvm-project/issues/201242 Migration guide docs: https://llvm.org/docs/SphinxQuickstartTemplate.html#markdown-migration-guidelines RFC: https://discourse.llvm.org/t/rfc-make-myst-markdown-the-llvm-docs-format-rip-rest/90840 This change was produced with rst2myst plus LLM cleanups. I manually paged through all of the linked HTML documents looking for visual artifacts, and I fixed everything I found. To reviewers: Please spot check the generated HTML below, and spot check the diff to look for artifacts. This change is too large to review everything line-by-line, but if you check 10 pages of documentation, and only find one migration bug, I hope you think that this is good enough to land. We have existing reST bugs that this fixes (mostly italic blocks that should be code font spans). ----- Links to the updated HTML for validation: | Source file | Before HTML | After HTML | |---|---|---| | `clang/docs/UsersManual.md` | [before](https://clang.llvm.org/docs/UsersManual.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/UsersManual.html) | | `clang/docs/SanitizerStats.md` | [before](https://clang.llvm.org/docs/SanitizerStats.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SanitizerStats.html) | | `clang/docs/SanitizerSpecialCaseList.md` | [before](https://clang.llvm.org/docs/SanitizerSpecialCaseList.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SanitizerSpecialCaseList.html) | | `clang/docs/OverflowBehaviorTypes.md` | [before](https://clang.llvm.org/docs/OverflowBehaviorTypes.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/OverflowBehaviorTypes.html) | | `clang/docs/LTOVisibility.md` | [before](https://clang.llvm.org/docs/LTOVisibility.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/LTOVisibility.html) | | `clang/docs/PointerAuthentication.md` | [before](https://clang.llvm.org/docs/PointerAuthentication.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/PointerAuthentication.html) | | `clang/docs/SafeStack.md` | [before](https://clang.llvm.org/docs/SafeStack.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SafeStack.html) | | `clang/docs/ShadowCallStack.md` | [before](https://clang.llvm.org/docs/ShadowCallStack.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/ShadowCallStack.html) | | `clang/docs/StructureProtection.md` | [before](https://clang.llvm.org/docs/StructureProtection.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/StructureProtection.html) | | `clang/docs/SourceBasedCodeCoverage.md` | [before](https://clang.llvm.org/docs/SourceBasedCodeCoverage.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SourceBasedCodeCoverage.html) | | `clang/docs/StandardCPlusPlusModules.md` | [before](https://clang.llvm.org/docs/StandardCPlusPlusModules.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/StandardCPlusPlusModules.html) | | `clang/docs/Modules.md` | [before](https://clang.llvm.org/docs/Modules.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/Modules.html) | | `clang/docs/MSVCCompatibility.md` | [before](https://clang.llvm.org/docs/MSVCCompatibility.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/MSVCCompatibility.html) | | `clang/docs/MisExpect.md` | [before](https://clang.llvm.org/docs/MisExpect.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/MisExpect.html) | | `clang/docs/OpenCLSupport.md` | [before](https://clang.llvm.org/docs/OpenCLSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/OpenCLSupport.html) | | `clang/docs/OpenMPSupport.md` | [before](https://clang.llvm.org/docs/OpenMPSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/OpenMPSupport.html) | | `clang/docs/SYCLSupport.md` | [before](https://clang.llvm.org/docs/SYCLSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SYCLSupport.html) | | `clang/docs/HIPSupport.md` | [before](https://clang.llvm.org/docs/HIPSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/HIPSupport.html) | | `clang/docs/HLSL/HLSLDocs.md` | [before](https://clang.llvm.org/docs/HLSL/HLSLDocs.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/HLSL/HLSLDocs.html) | | `clang/docs/ThinLTO.md` | [before](https://clang.llvm.org/docs/ThinLTO.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/ThinLTO.html) | --------- Co-authored-by: Chris B <chris.bieneman@me.com>
2026-07-09 07:16:15 -08:00
### Low-level API
[clang][docs] Rewrite 20 selected Clang docs from reST to Markdown (#208310) Tracking issue: https://github.com/llvm/llvm-project/issues/201242 Migration guide docs: https://llvm.org/docs/SphinxQuickstartTemplate.html#markdown-migration-guidelines RFC: https://discourse.llvm.org/t/rfc-make-myst-markdown-the-llvm-docs-format-rip-rest/90840 This change was produced with rst2myst plus LLM cleanups. I manually paged through all of the linked HTML documents looking for visual artifacts, and I fixed everything I found. To reviewers: Please spot check the generated HTML below, and spot check the diff to look for artifacts. This change is too large to review everything line-by-line, but if you check 10 pages of documentation, and only find one migration bug, I hope you think that this is good enough to land. We have existing reST bugs that this fixes (mostly italic blocks that should be code font spans). ----- Links to the updated HTML for validation: | Source file | Before HTML | After HTML | |---|---|---| | `clang/docs/UsersManual.md` | [before](https://clang.llvm.org/docs/UsersManual.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/UsersManual.html) | | `clang/docs/SanitizerStats.md` | [before](https://clang.llvm.org/docs/SanitizerStats.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SanitizerStats.html) | | `clang/docs/SanitizerSpecialCaseList.md` | [before](https://clang.llvm.org/docs/SanitizerSpecialCaseList.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SanitizerSpecialCaseList.html) | | `clang/docs/OverflowBehaviorTypes.md` | [before](https://clang.llvm.org/docs/OverflowBehaviorTypes.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/OverflowBehaviorTypes.html) | | `clang/docs/LTOVisibility.md` | [before](https://clang.llvm.org/docs/LTOVisibility.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/LTOVisibility.html) | | `clang/docs/PointerAuthentication.md` | [before](https://clang.llvm.org/docs/PointerAuthentication.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/PointerAuthentication.html) | | `clang/docs/SafeStack.md` | [before](https://clang.llvm.org/docs/SafeStack.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SafeStack.html) | | `clang/docs/ShadowCallStack.md` | [before](https://clang.llvm.org/docs/ShadowCallStack.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/ShadowCallStack.html) | | `clang/docs/StructureProtection.md` | [before](https://clang.llvm.org/docs/StructureProtection.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/StructureProtection.html) | | `clang/docs/SourceBasedCodeCoverage.md` | [before](https://clang.llvm.org/docs/SourceBasedCodeCoverage.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SourceBasedCodeCoverage.html) | | `clang/docs/StandardCPlusPlusModules.md` | [before](https://clang.llvm.org/docs/StandardCPlusPlusModules.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/StandardCPlusPlusModules.html) | | `clang/docs/Modules.md` | [before](https://clang.llvm.org/docs/Modules.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/Modules.html) | | `clang/docs/MSVCCompatibility.md` | [before](https://clang.llvm.org/docs/MSVCCompatibility.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/MSVCCompatibility.html) | | `clang/docs/MisExpect.md` | [before](https://clang.llvm.org/docs/MisExpect.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/MisExpect.html) | | `clang/docs/OpenCLSupport.md` | [before](https://clang.llvm.org/docs/OpenCLSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/OpenCLSupport.html) | | `clang/docs/OpenMPSupport.md` | [before](https://clang.llvm.org/docs/OpenMPSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/OpenMPSupport.html) | | `clang/docs/SYCLSupport.md` | [before](https://clang.llvm.org/docs/SYCLSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SYCLSupport.html) | | `clang/docs/HIPSupport.md` | [before](https://clang.llvm.org/docs/HIPSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/HIPSupport.html) | | `clang/docs/HLSL/HLSLDocs.md` | [before](https://clang.llvm.org/docs/HLSL/HLSLDocs.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/HLSL/HLSLDocs.html) | | `clang/docs/ThinLTO.md` | [before](https://clang.llvm.org/docs/ThinLTO.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/ThinLTO.html) | --------- Co-authored-by: Chris B <chris.bieneman@me.com>
2026-07-09 07:16:15 -08:00
#### `__has_feature(shadow_call_stack)`
In some cases one may need to execute different code depending on whether
[clang][docs] Rewrite 20 selected Clang docs from reST to Markdown (#208310) Tracking issue: https://github.com/llvm/llvm-project/issues/201242 Migration guide docs: https://llvm.org/docs/SphinxQuickstartTemplate.html#markdown-migration-guidelines RFC: https://discourse.llvm.org/t/rfc-make-myst-markdown-the-llvm-docs-format-rip-rest/90840 This change was produced with rst2myst plus LLM cleanups. I manually paged through all of the linked HTML documents looking for visual artifacts, and I fixed everything I found. To reviewers: Please spot check the generated HTML below, and spot check the diff to look for artifacts. This change is too large to review everything line-by-line, but if you check 10 pages of documentation, and only find one migration bug, I hope you think that this is good enough to land. We have existing reST bugs that this fixes (mostly italic blocks that should be code font spans). ----- Links to the updated HTML for validation: | Source file | Before HTML | After HTML | |---|---|---| | `clang/docs/UsersManual.md` | [before](https://clang.llvm.org/docs/UsersManual.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/UsersManual.html) | | `clang/docs/SanitizerStats.md` | [before](https://clang.llvm.org/docs/SanitizerStats.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SanitizerStats.html) | | `clang/docs/SanitizerSpecialCaseList.md` | [before](https://clang.llvm.org/docs/SanitizerSpecialCaseList.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SanitizerSpecialCaseList.html) | | `clang/docs/OverflowBehaviorTypes.md` | [before](https://clang.llvm.org/docs/OverflowBehaviorTypes.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/OverflowBehaviorTypes.html) | | `clang/docs/LTOVisibility.md` | [before](https://clang.llvm.org/docs/LTOVisibility.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/LTOVisibility.html) | | `clang/docs/PointerAuthentication.md` | [before](https://clang.llvm.org/docs/PointerAuthentication.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/PointerAuthentication.html) | | `clang/docs/SafeStack.md` | [before](https://clang.llvm.org/docs/SafeStack.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SafeStack.html) | | `clang/docs/ShadowCallStack.md` | [before](https://clang.llvm.org/docs/ShadowCallStack.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/ShadowCallStack.html) | | `clang/docs/StructureProtection.md` | [before](https://clang.llvm.org/docs/StructureProtection.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/StructureProtection.html) | | `clang/docs/SourceBasedCodeCoverage.md` | [before](https://clang.llvm.org/docs/SourceBasedCodeCoverage.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SourceBasedCodeCoverage.html) | | `clang/docs/StandardCPlusPlusModules.md` | [before](https://clang.llvm.org/docs/StandardCPlusPlusModules.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/StandardCPlusPlusModules.html) | | `clang/docs/Modules.md` | [before](https://clang.llvm.org/docs/Modules.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/Modules.html) | | `clang/docs/MSVCCompatibility.md` | [before](https://clang.llvm.org/docs/MSVCCompatibility.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/MSVCCompatibility.html) | | `clang/docs/MisExpect.md` | [before](https://clang.llvm.org/docs/MisExpect.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/MisExpect.html) | | `clang/docs/OpenCLSupport.md` | [before](https://clang.llvm.org/docs/OpenCLSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/OpenCLSupport.html) | | `clang/docs/OpenMPSupport.md` | [before](https://clang.llvm.org/docs/OpenMPSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/OpenMPSupport.html) | | `clang/docs/SYCLSupport.md` | [before](https://clang.llvm.org/docs/SYCLSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SYCLSupport.html) | | `clang/docs/HIPSupport.md` | [before](https://clang.llvm.org/docs/HIPSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/HIPSupport.html) | | `clang/docs/HLSL/HLSLDocs.md` | [before](https://clang.llvm.org/docs/HLSL/HLSLDocs.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/HLSL/HLSLDocs.html) | | `clang/docs/ThinLTO.md` | [before](https://clang.llvm.org/docs/ThinLTO.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/ThinLTO.html) | --------- Co-authored-by: Chris B <chris.bieneman@me.com>
2026-07-09 07:16:15 -08:00
ShadowCallStack is enabled. The macro `__has_feature(shadow_call_stack)` can
be used for this purpose.
[clang][docs] Rewrite 20 selected Clang docs from reST to Markdown (#208310) Tracking issue: https://github.com/llvm/llvm-project/issues/201242 Migration guide docs: https://llvm.org/docs/SphinxQuickstartTemplate.html#markdown-migration-guidelines RFC: https://discourse.llvm.org/t/rfc-make-myst-markdown-the-llvm-docs-format-rip-rest/90840 This change was produced with rst2myst plus LLM cleanups. I manually paged through all of the linked HTML documents looking for visual artifacts, and I fixed everything I found. To reviewers: Please spot check the generated HTML below, and spot check the diff to look for artifacts. This change is too large to review everything line-by-line, but if you check 10 pages of documentation, and only find one migration bug, I hope you think that this is good enough to land. We have existing reST bugs that this fixes (mostly italic blocks that should be code font spans). ----- Links to the updated HTML for validation: | Source file | Before HTML | After HTML | |---|---|---| | `clang/docs/UsersManual.md` | [before](https://clang.llvm.org/docs/UsersManual.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/UsersManual.html) | | `clang/docs/SanitizerStats.md` | [before](https://clang.llvm.org/docs/SanitizerStats.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SanitizerStats.html) | | `clang/docs/SanitizerSpecialCaseList.md` | [before](https://clang.llvm.org/docs/SanitizerSpecialCaseList.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SanitizerSpecialCaseList.html) | | `clang/docs/OverflowBehaviorTypes.md` | [before](https://clang.llvm.org/docs/OverflowBehaviorTypes.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/OverflowBehaviorTypes.html) | | `clang/docs/LTOVisibility.md` | [before](https://clang.llvm.org/docs/LTOVisibility.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/LTOVisibility.html) | | `clang/docs/PointerAuthentication.md` | [before](https://clang.llvm.org/docs/PointerAuthentication.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/PointerAuthentication.html) | | `clang/docs/SafeStack.md` | [before](https://clang.llvm.org/docs/SafeStack.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SafeStack.html) | | `clang/docs/ShadowCallStack.md` | [before](https://clang.llvm.org/docs/ShadowCallStack.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/ShadowCallStack.html) | | `clang/docs/StructureProtection.md` | [before](https://clang.llvm.org/docs/StructureProtection.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/StructureProtection.html) | | `clang/docs/SourceBasedCodeCoverage.md` | [before](https://clang.llvm.org/docs/SourceBasedCodeCoverage.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SourceBasedCodeCoverage.html) | | `clang/docs/StandardCPlusPlusModules.md` | [before](https://clang.llvm.org/docs/StandardCPlusPlusModules.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/StandardCPlusPlusModules.html) | | `clang/docs/Modules.md` | [before](https://clang.llvm.org/docs/Modules.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/Modules.html) | | `clang/docs/MSVCCompatibility.md` | [before](https://clang.llvm.org/docs/MSVCCompatibility.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/MSVCCompatibility.html) | | `clang/docs/MisExpect.md` | [before](https://clang.llvm.org/docs/MisExpect.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/MisExpect.html) | | `clang/docs/OpenCLSupport.md` | [before](https://clang.llvm.org/docs/OpenCLSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/OpenCLSupport.html) | | `clang/docs/OpenMPSupport.md` | [before](https://clang.llvm.org/docs/OpenMPSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/OpenMPSupport.html) | | `clang/docs/SYCLSupport.md` | [before](https://clang.llvm.org/docs/SYCLSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SYCLSupport.html) | | `clang/docs/HIPSupport.md` | [before](https://clang.llvm.org/docs/HIPSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/HIPSupport.html) | | `clang/docs/HLSL/HLSLDocs.md` | [before](https://clang.llvm.org/docs/HLSL/HLSLDocs.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/HLSL/HLSLDocs.html) | | `clang/docs/ThinLTO.md` | [before](https://clang.llvm.org/docs/ThinLTO.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/ThinLTO.html) | --------- Co-authored-by: Chris B <chris.bieneman@me.com>
2026-07-09 07:16:15 -08:00
```c
#if defined(__has_feature)
# if __has_feature(shadow_call_stack)
// code that builds only under ShadowCallStack
# endif
#endif
```
[clang][docs] Rewrite 20 selected Clang docs from reST to Markdown (#208310) Tracking issue: https://github.com/llvm/llvm-project/issues/201242 Migration guide docs: https://llvm.org/docs/SphinxQuickstartTemplate.html#markdown-migration-guidelines RFC: https://discourse.llvm.org/t/rfc-make-myst-markdown-the-llvm-docs-format-rip-rest/90840 This change was produced with rst2myst plus LLM cleanups. I manually paged through all of the linked HTML documents looking for visual artifacts, and I fixed everything I found. To reviewers: Please spot check the generated HTML below, and spot check the diff to look for artifacts. This change is too large to review everything line-by-line, but if you check 10 pages of documentation, and only find one migration bug, I hope you think that this is good enough to land. We have existing reST bugs that this fixes (mostly italic blocks that should be code font spans). ----- Links to the updated HTML for validation: | Source file | Before HTML | After HTML | |---|---|---| | `clang/docs/UsersManual.md` | [before](https://clang.llvm.org/docs/UsersManual.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/UsersManual.html) | | `clang/docs/SanitizerStats.md` | [before](https://clang.llvm.org/docs/SanitizerStats.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SanitizerStats.html) | | `clang/docs/SanitizerSpecialCaseList.md` | [before](https://clang.llvm.org/docs/SanitizerSpecialCaseList.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SanitizerSpecialCaseList.html) | | `clang/docs/OverflowBehaviorTypes.md` | [before](https://clang.llvm.org/docs/OverflowBehaviorTypes.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/OverflowBehaviorTypes.html) | | `clang/docs/LTOVisibility.md` | [before](https://clang.llvm.org/docs/LTOVisibility.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/LTOVisibility.html) | | `clang/docs/PointerAuthentication.md` | [before](https://clang.llvm.org/docs/PointerAuthentication.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/PointerAuthentication.html) | | `clang/docs/SafeStack.md` | [before](https://clang.llvm.org/docs/SafeStack.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SafeStack.html) | | `clang/docs/ShadowCallStack.md` | [before](https://clang.llvm.org/docs/ShadowCallStack.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/ShadowCallStack.html) | | `clang/docs/StructureProtection.md` | [before](https://clang.llvm.org/docs/StructureProtection.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/StructureProtection.html) | | `clang/docs/SourceBasedCodeCoverage.md` | [before](https://clang.llvm.org/docs/SourceBasedCodeCoverage.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SourceBasedCodeCoverage.html) | | `clang/docs/StandardCPlusPlusModules.md` | [before](https://clang.llvm.org/docs/StandardCPlusPlusModules.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/StandardCPlusPlusModules.html) | | `clang/docs/Modules.md` | [before](https://clang.llvm.org/docs/Modules.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/Modules.html) | | `clang/docs/MSVCCompatibility.md` | [before](https://clang.llvm.org/docs/MSVCCompatibility.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/MSVCCompatibility.html) | | `clang/docs/MisExpect.md` | [before](https://clang.llvm.org/docs/MisExpect.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/MisExpect.html) | | `clang/docs/OpenCLSupport.md` | [before](https://clang.llvm.org/docs/OpenCLSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/OpenCLSupport.html) | | `clang/docs/OpenMPSupport.md` | [before](https://clang.llvm.org/docs/OpenMPSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/OpenMPSupport.html) | | `clang/docs/SYCLSupport.md` | [before](https://clang.llvm.org/docs/SYCLSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SYCLSupport.html) | | `clang/docs/HIPSupport.md` | [before](https://clang.llvm.org/docs/HIPSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/HIPSupport.html) | | `clang/docs/HLSL/HLSLDocs.md` | [before](https://clang.llvm.org/docs/HLSL/HLSLDocs.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/HLSL/HLSLDocs.html) | | `clang/docs/ThinLTO.md` | [before](https://clang.llvm.org/docs/ThinLTO.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/ThinLTO.html) | --------- Co-authored-by: Chris B <chris.bieneman@me.com>
2026-07-09 07:16:15 -08:00
#### `__attribute__((no_sanitize("shadow-call-stack")))`
[clang][docs] Rewrite 20 selected Clang docs from reST to Markdown (#208310) Tracking issue: https://github.com/llvm/llvm-project/issues/201242 Migration guide docs: https://llvm.org/docs/SphinxQuickstartTemplate.html#markdown-migration-guidelines RFC: https://discourse.llvm.org/t/rfc-make-myst-markdown-the-llvm-docs-format-rip-rest/90840 This change was produced with rst2myst plus LLM cleanups. I manually paged through all of the linked HTML documents looking for visual artifacts, and I fixed everything I found. To reviewers: Please spot check the generated HTML below, and spot check the diff to look for artifacts. This change is too large to review everything line-by-line, but if you check 10 pages of documentation, and only find one migration bug, I hope you think that this is good enough to land. We have existing reST bugs that this fixes (mostly italic blocks that should be code font spans). ----- Links to the updated HTML for validation: | Source file | Before HTML | After HTML | |---|---|---| | `clang/docs/UsersManual.md` | [before](https://clang.llvm.org/docs/UsersManual.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/UsersManual.html) | | `clang/docs/SanitizerStats.md` | [before](https://clang.llvm.org/docs/SanitizerStats.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SanitizerStats.html) | | `clang/docs/SanitizerSpecialCaseList.md` | [before](https://clang.llvm.org/docs/SanitizerSpecialCaseList.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SanitizerSpecialCaseList.html) | | `clang/docs/OverflowBehaviorTypes.md` | [before](https://clang.llvm.org/docs/OverflowBehaviorTypes.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/OverflowBehaviorTypes.html) | | `clang/docs/LTOVisibility.md` | [before](https://clang.llvm.org/docs/LTOVisibility.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/LTOVisibility.html) | | `clang/docs/PointerAuthentication.md` | [before](https://clang.llvm.org/docs/PointerAuthentication.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/PointerAuthentication.html) | | `clang/docs/SafeStack.md` | [before](https://clang.llvm.org/docs/SafeStack.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SafeStack.html) | | `clang/docs/ShadowCallStack.md` | [before](https://clang.llvm.org/docs/ShadowCallStack.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/ShadowCallStack.html) | | `clang/docs/StructureProtection.md` | [before](https://clang.llvm.org/docs/StructureProtection.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/StructureProtection.html) | | `clang/docs/SourceBasedCodeCoverage.md` | [before](https://clang.llvm.org/docs/SourceBasedCodeCoverage.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SourceBasedCodeCoverage.html) | | `clang/docs/StandardCPlusPlusModules.md` | [before](https://clang.llvm.org/docs/StandardCPlusPlusModules.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/StandardCPlusPlusModules.html) | | `clang/docs/Modules.md` | [before](https://clang.llvm.org/docs/Modules.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/Modules.html) | | `clang/docs/MSVCCompatibility.md` | [before](https://clang.llvm.org/docs/MSVCCompatibility.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/MSVCCompatibility.html) | | `clang/docs/MisExpect.md` | [before](https://clang.llvm.org/docs/MisExpect.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/MisExpect.html) | | `clang/docs/OpenCLSupport.md` | [before](https://clang.llvm.org/docs/OpenCLSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/OpenCLSupport.html) | | `clang/docs/OpenMPSupport.md` | [before](https://clang.llvm.org/docs/OpenMPSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/OpenMPSupport.html) | | `clang/docs/SYCLSupport.md` | [before](https://clang.llvm.org/docs/SYCLSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SYCLSupport.html) | | `clang/docs/HIPSupport.md` | [before](https://clang.llvm.org/docs/HIPSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/HIPSupport.html) | | `clang/docs/HLSL/HLSLDocs.md` | [before](https://clang.llvm.org/docs/HLSL/HLSLDocs.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/HLSL/HLSLDocs.html) | | `clang/docs/ThinLTO.md` | [before](https://clang.llvm.org/docs/ThinLTO.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/ThinLTO.html) | --------- Co-authored-by: Chris B <chris.bieneman@me.com>
2026-07-09 07:16:15 -08:00
Use `__attribute__((no_sanitize("shadow-call-stack")))` on a function
declaration to specify that the shadow call stack instrumentation should not be
applied to that function, even if enabled globally.
[clang][docs] Rewrite 20 selected Clang docs from reST to Markdown (#208310) Tracking issue: https://github.com/llvm/llvm-project/issues/201242 Migration guide docs: https://llvm.org/docs/SphinxQuickstartTemplate.html#markdown-migration-guidelines RFC: https://discourse.llvm.org/t/rfc-make-myst-markdown-the-llvm-docs-format-rip-rest/90840 This change was produced with rst2myst plus LLM cleanups. I manually paged through all of the linked HTML documents looking for visual artifacts, and I fixed everything I found. To reviewers: Please spot check the generated HTML below, and spot check the diff to look for artifacts. This change is too large to review everything line-by-line, but if you check 10 pages of documentation, and only find one migration bug, I hope you think that this is good enough to land. We have existing reST bugs that this fixes (mostly italic blocks that should be code font spans). ----- Links to the updated HTML for validation: | Source file | Before HTML | After HTML | |---|---|---| | `clang/docs/UsersManual.md` | [before](https://clang.llvm.org/docs/UsersManual.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/UsersManual.html) | | `clang/docs/SanitizerStats.md` | [before](https://clang.llvm.org/docs/SanitizerStats.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SanitizerStats.html) | | `clang/docs/SanitizerSpecialCaseList.md` | [before](https://clang.llvm.org/docs/SanitizerSpecialCaseList.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SanitizerSpecialCaseList.html) | | `clang/docs/OverflowBehaviorTypes.md` | [before](https://clang.llvm.org/docs/OverflowBehaviorTypes.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/OverflowBehaviorTypes.html) | | `clang/docs/LTOVisibility.md` | [before](https://clang.llvm.org/docs/LTOVisibility.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/LTOVisibility.html) | | `clang/docs/PointerAuthentication.md` | [before](https://clang.llvm.org/docs/PointerAuthentication.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/PointerAuthentication.html) | | `clang/docs/SafeStack.md` | [before](https://clang.llvm.org/docs/SafeStack.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SafeStack.html) | | `clang/docs/ShadowCallStack.md` | [before](https://clang.llvm.org/docs/ShadowCallStack.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/ShadowCallStack.html) | | `clang/docs/StructureProtection.md` | [before](https://clang.llvm.org/docs/StructureProtection.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/StructureProtection.html) | | `clang/docs/SourceBasedCodeCoverage.md` | [before](https://clang.llvm.org/docs/SourceBasedCodeCoverage.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SourceBasedCodeCoverage.html) | | `clang/docs/StandardCPlusPlusModules.md` | [before](https://clang.llvm.org/docs/StandardCPlusPlusModules.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/StandardCPlusPlusModules.html) | | `clang/docs/Modules.md` | [before](https://clang.llvm.org/docs/Modules.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/Modules.html) | | `clang/docs/MSVCCompatibility.md` | [before](https://clang.llvm.org/docs/MSVCCompatibility.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/MSVCCompatibility.html) | | `clang/docs/MisExpect.md` | [before](https://clang.llvm.org/docs/MisExpect.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/MisExpect.html) | | `clang/docs/OpenCLSupport.md` | [before](https://clang.llvm.org/docs/OpenCLSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/OpenCLSupport.html) | | `clang/docs/OpenMPSupport.md` | [before](https://clang.llvm.org/docs/OpenMPSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/OpenMPSupport.html) | | `clang/docs/SYCLSupport.md` | [before](https://clang.llvm.org/docs/SYCLSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SYCLSupport.html) | | `clang/docs/HIPSupport.md` | [before](https://clang.llvm.org/docs/HIPSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/HIPSupport.html) | | `clang/docs/HLSL/HLSLDocs.md` | [before](https://clang.llvm.org/docs/HLSL/HLSLDocs.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/HLSL/HLSLDocs.html) | | `clang/docs/ThinLTO.md` | [before](https://clang.llvm.org/docs/ThinLTO.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/ThinLTO.html) | --------- Co-authored-by: Chris B <chris.bieneman@me.com>
2026-07-09 07:16:15 -08:00
## Example
The following example code:
[clang][docs] Rewrite 20 selected Clang docs from reST to Markdown (#208310) Tracking issue: https://github.com/llvm/llvm-project/issues/201242 Migration guide docs: https://llvm.org/docs/SphinxQuickstartTemplate.html#markdown-migration-guidelines RFC: https://discourse.llvm.org/t/rfc-make-myst-markdown-the-llvm-docs-format-rip-rest/90840 This change was produced with rst2myst plus LLM cleanups. I manually paged through all of the linked HTML documents looking for visual artifacts, and I fixed everything I found. To reviewers: Please spot check the generated HTML below, and spot check the diff to look for artifacts. This change is too large to review everything line-by-line, but if you check 10 pages of documentation, and only find one migration bug, I hope you think that this is good enough to land. We have existing reST bugs that this fixes (mostly italic blocks that should be code font spans). ----- Links to the updated HTML for validation: | Source file | Before HTML | After HTML | |---|---|---| | `clang/docs/UsersManual.md` | [before](https://clang.llvm.org/docs/UsersManual.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/UsersManual.html) | | `clang/docs/SanitizerStats.md` | [before](https://clang.llvm.org/docs/SanitizerStats.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SanitizerStats.html) | | `clang/docs/SanitizerSpecialCaseList.md` | [before](https://clang.llvm.org/docs/SanitizerSpecialCaseList.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SanitizerSpecialCaseList.html) | | `clang/docs/OverflowBehaviorTypes.md` | [before](https://clang.llvm.org/docs/OverflowBehaviorTypes.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/OverflowBehaviorTypes.html) | | `clang/docs/LTOVisibility.md` | [before](https://clang.llvm.org/docs/LTOVisibility.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/LTOVisibility.html) | | `clang/docs/PointerAuthentication.md` | [before](https://clang.llvm.org/docs/PointerAuthentication.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/PointerAuthentication.html) | | `clang/docs/SafeStack.md` | [before](https://clang.llvm.org/docs/SafeStack.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SafeStack.html) | | `clang/docs/ShadowCallStack.md` | [before](https://clang.llvm.org/docs/ShadowCallStack.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/ShadowCallStack.html) | | `clang/docs/StructureProtection.md` | [before](https://clang.llvm.org/docs/StructureProtection.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/StructureProtection.html) | | `clang/docs/SourceBasedCodeCoverage.md` | [before](https://clang.llvm.org/docs/SourceBasedCodeCoverage.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SourceBasedCodeCoverage.html) | | `clang/docs/StandardCPlusPlusModules.md` | [before](https://clang.llvm.org/docs/StandardCPlusPlusModules.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/StandardCPlusPlusModules.html) | | `clang/docs/Modules.md` | [before](https://clang.llvm.org/docs/Modules.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/Modules.html) | | `clang/docs/MSVCCompatibility.md` | [before](https://clang.llvm.org/docs/MSVCCompatibility.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/MSVCCompatibility.html) | | `clang/docs/MisExpect.md` | [before](https://clang.llvm.org/docs/MisExpect.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/MisExpect.html) | | `clang/docs/OpenCLSupport.md` | [before](https://clang.llvm.org/docs/OpenCLSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/OpenCLSupport.html) | | `clang/docs/OpenMPSupport.md` | [before](https://clang.llvm.org/docs/OpenMPSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/OpenMPSupport.html) | | `clang/docs/SYCLSupport.md` | [before](https://clang.llvm.org/docs/SYCLSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/SYCLSupport.html) | | `clang/docs/HIPSupport.md` | [before](https://clang.llvm.org/docs/HIPSupport.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/HIPSupport.html) | | `clang/docs/HLSL/HLSLDocs.md` | [before](https://clang.llvm.org/docs/HLSL/HLSLDocs.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/HLSL/HLSLDocs.html) | | `clang/docs/ThinLTO.md` | [before](https://clang.llvm.org/docs/ThinLTO.html) | [after](https://llvmdocs.staging.reidkleckner.dev/clang/docs/ThinLTO.html) | --------- Co-authored-by: Chris B <chris.bieneman@me.com>
2026-07-09 07:16:15 -08:00
```c++
int foo() {
return bar() + 1;
}
```
Generates the following aarch64 assembly when compiled with `-O2`:
```none
stp x29, x30, [sp, #-16]!
mov x29, sp
bl bar
add w0, w0, #1
ldp x29, x30, [sp], #16
ret
```
Adding `-fsanitize=shadow-call-stack` would output the following assembly:
```none
str x30, [x18], #8
stp x29, x30, [sp, #-16]!
mov x29, sp
bl bar
add w0, w0, #1
ldp x29, x30, [sp], #16
ldr x30, [x18, #-8]!
ret
```
[android-avoids-this]: https://android.googlesource.com/platform/bionic/+/808d176e7e0dd727c7f929622ec017f6e065c582/libc/arch-arm64/bionic/setjmp.S#49
[android-changed]: https://android-review.googlesource.com/c/platform/frameworks/av/+/837745
[android-example]: https://android-review.googlesource.com/c/platform/frameworks/base/+/803717
[android-will-do-this]: https://android-review.googlesource.com/c/platform/bionic/+/891622
[anc]: https://www.vusec.net/projects/anc/
[cet]: https://software.intel.com/sites/default/files/managed/4d/2a/control-flow-enforcement-technology-preview.pdf
[clang-701-doc]: https://releases.llvm.org/7.0.1/tools/clang/docs/ShadowCallStack.html
[rfg]: https://xlab.tencent.com/en/2016/11/02/return-flow-guard/
[safestack-bypass]: https://www.blackhat.com/docs/eu-16/materials/eu-16-Goktas-Bypassing-Clangs-SafeStack.pdf
[scs-cartography]: https://eyalitkin.wordpress.com/2017/09/01/cartography-lighting-up-the-shadows/
[scs-runtime]: https://android.googlesource.com/platform/bionic/+/808d176e7e0dd727c7f929622ec017f6e065c582/libc/bionic/pthread_create.cpp#128
[zicfiss]: https://github.com/riscv/riscv-cfi/blob/main/cfi_backward.adoc