Skip to content

Commit 365e9e2

Browse files
authored
Merge pull request #75 from SwiftGGTeam/33-documentationserverguidesllvm-sanitizersmd
[33] - llvm-sanitizers
2 parents 7a06ef6 + a603eca commit 365e9e2

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

documentation/server/guides/llvm-sanitizers.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,32 +4,32 @@ layout: page
44
title: LLVM TSAN / ASAN
55
---
66

7-
For multithreaded and low-level unsafe interfacing server code, the ability to use LLVM's [ThreadSanitizer](https://clang.llvm.org/docs/ThreadSanitizer.html) and
8-
[AddressSanitizer](https://clang.llvm.org/docs/AddressSanitizer.html) can help troubleshoot invalid thread usage and invalid usage/access of memory.
7+
对于涉及多线程操作和需要与低级别不安全接口交互的服务器端代码,使用 LLVM[ThreadSanitizer](https://clang.llvm.org/docs/ThreadSanitizer.html)
8+
[AddressSanitizer](https://clang.llvm.org/docs/AddressSanitizer.html) 的能力可以帮助排查无效的线程使用和无效的内存使用/访问。
99

10-
There is a [blog post](/blog/tsan-support-on-linux/) outlining the usage of TSAN.
10+
有一篇 [博客文章](/blog/tsan-support-on-linux/) 概述了 TSAN 的使用。
1111

12-
The short story is to use the swiftc command line options `-sanitize=address` and `-sanitize=thread` to each respective tool.
12+
简而言之,就是在 swiftc 命令行选项中使用 `-sanitize=address` `-sanitize=thread` 来分别使用每个工具。
1313

14-
Also for Swift Package Manager projects you can use `--sanitize` at the command line, e.g.:
14+
对于 Swift Package Manager 项目,你也可以在命令行中使用 `--sanitize` ,例如:
1515

1616
```
1717
swift build --sanitize=address
1818
```
1919

20-
or
20+
或者
2121

2222
```
2323
swift build --sanitize=thread
2424
```
2525

26-
and it can be used for the tests too:
26+
它也可以用于测试:
2727

2828
```
2929
swift test --sanitize=address
3030
```
3131

32-
or
32+
或者
3333

3434
```
3535
swift test --sanitize=thread

0 commit comments

Comments
 (0)