<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/122522>122522</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            [TySan] Add documentation analagous to address sanitizer & thread sanitizer documentation
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          seanm
      </td>
    </tr>
</table>

<pre>
    Unless I'm just missing it, TySan (type sanitizer) doesn't have any doc analogous to these two:

- https://clang.llvm.org/docs/AddressSanitizer.html
- https://clang.llvm.org/docs/ThreadSanitizer.html

Those are both great write ups, and users like me would benefit from something similar for TySan.

Some ideas of things to cover:

- ASan & TSan cannot be used together. Similar limitations with TySan?
- Do suppressions work the same as with other sanitzers?
- is there a `__has_feature` to detect TySan?
- is there a `__attribute__((no_sanitize("type")))`?
- can TySan be configured to trap instead of just log?
- TySan error messages are often of the form:

`==4848==ERROR: TypeSanitizer: type-aliasing-violation on address 0x00016cfc71f0 (pc 0x000102e3b690 bp 0x00016cfc6ea0 sp 0x00016cfc6620 tid 24776816)
READ of size 8 at 0x00016cfc71f0 with type p1 omnipotent char (in <anonymous type> at offset 8) accesses an existing object of type p1 omnipotent char (in <anonymous type> at offset 8)
    #0 0x000102e3b68c in free_opts_mem test.c:20`

- The terms "omnipotent char", "type p1", etc. should be documented & explained
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJykVF1vszgT_TXOzaiRMQkhF7nI2zTSe7VSm72OjD2Anwds5Bnapr9-ZSDdtnu1WgkpZPB8-JwzRxO5xiMexPZ_Ynta6ZHbEA-E2verKtjb4U_fIRH8X6hdD79GYugdkfMNOBbqES63F-1BqJJvAwJp79h9YBRqDzYgeaF2DK1-RdD-BjYY0F53oQkjAQfgFgmB34LIj0Km5wFa5oHSf3UW6mw67Zt117326xAboc42GBLqfLQ2ItHLveO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