[PATCH] D32197: [TySan] A Type Sanitizer (Runtime Library)
Mingjie Xu via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 7 03:13:43 PST 2023
Enna1 added a comment.
Hi @fhahn , I have tested tysan locally, check-tysan passed on both Linux x86_64 and Linux AArch64.
But there is a small issue when build llvm compiler-rt with `COMPILER_RT_DEBUG=ON` and run check-tysan:
SanitizerTool: CHECK failed: tysan.cpp:122 "((0)) != (0)" (0x0, 0x0) (tid=288531)
Also if there is any thing I could help landing tysan, I’d be happy to volunteer :)
================
Comment at: compiler-rt/lib/tysan/tysan.cpp:70
+ printTDName(td->Member.Base);
+ Printf(" at offset %u)", td->Member.Offset);
+ }
----------------
%zu
================
Comment at: compiler-rt/lib/tysan/tysan.cpp:122
+ if (!TDA->Struct.MemberCount) {
+ DCHECK(0);
+ break;
----------------
This line will be executed when TDA points to __tysan_v1_Simple_20C_2fC_2b_2b_20TBAA.
I suggest ether remove this `DCHECK(0)` or replace it with
```
if (Verbosity())
Report("Reach root type descriptor\n");
```
================
Comment at: compiler-rt/lib/tysan/tysan.cpp:173
+ Report("ERROR: TypeSanitizer: type-aliasing-violation on address %p"
+ " (pc %p bp %p sp %p tid %d)\n",
+ Addr, (void *)pc, (void *)bp, (void *)sp, GetTid());
----------------
%llu
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D32197/new/
https://reviews.llvm.org/D32197
More information about the llvm-commits
mailing list