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

    <tr>
        <th>Summary</th>
        <td>
            Make it possible to show full stack trace in TySan findings
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            compiler-rt:tysan
      </td>
    </tr>

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

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

<pre>
    When encountering an issue within an application built with TySan the resulting message makes it difficult to pinpoint the actual code which is causing this:

```
==8766==ERROR: TypeSanitizer: type-aliasing-violation on address 0x7f1ca6ceb110 (pc 0x7f1ca5b442ca bp 0x7fffe21df150 sp 0x7fffe21df0f8 tid 8766)
READ of size 8 at 0x7f1ca6ceb110 with type long accesses part of an existing object of type std::__1::unordered_set<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::hash<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>, std::__1::equal_to<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>> that starts at offset -8
    #0 0x7f1ca5b442c9 in std::__1::__bucket_list_deallocator<std::__1::allocator<std::__1::__hash_node_base<std::__1::__hash_node<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, void*>*>*>>::size[abi:de190106]() const /usr/include/c++/v1/__hash_table:576:75
```

Other sanitizers provide the `print_stacktrace` option which can be set via their respective `*_OPTIONS` environment variables to show the full stacktrace. It would be great if TySan could provide such an option as well.
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJzMVU9v27gT_TT0ZWBDoixZPuigJjHQw--XRVpgj8KIHFnc0KSWHNlNP_2CirNNu2n3mAUIWxrOnzdP5DyM0RwdUSPKD6K8XeHMow_NYAJd8Eyr3uun5veRHJBTfnZM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