[PATCH] D32198: [TySan] A Type Sanitizer (LLVM)
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 6 05:43:03 PST 2023
fhahn marked 5 inline comments as done.
fhahn added inline comments.
================
Comment at: llvm/lib/Transforms/Instrumentation/TypeSanitizer.cpp:71
+
+/// TypeSanitizer: instrument the code in module to find races.
+struct TypeSanitizer {
----------------
Enna1 wrote:
> typo here: to find type-based-aliasing-violations?
Fixed, thanks!
================
Comment at: llvm/lib/Transforms/Instrumentation/TypeSanitizer.cpp:207
+static std::string encodeName(StringRef Name) {
+ static const char *const LUT = "0123456789abcdef";
+ size_t Length = Name.size();
----------------
MaskRay wrote:
> `static const char LUT[] = ...`
moved outside the function, thanks!
================
Comment at: llvm/lib/Transforms/Instrumentation/TypeSanitizer.cpp:214
+ const unsigned char c = Name[i];
+
+ if (isalnum((int)c)) {
----------------
MaskRay wrote:
> excess blank line
Removed, thanks!
================
Comment at: llvm/lib/Transforms/Instrumentation/TypeSanitizer.cpp:488
+ SmallSetVector<const MDNode *, 8> TBAAMetadata;
+ SmallVector<Value *, 8> MemTypeResetInsts;
+
----------------
MaskRay wrote:
> ditto everywhere
Should be removed.
================
Comment at: llvm/test/Instrumentation/TypeSanitizer/basic.ll:1
+; Test basic type sanitizer instrumentation.
+;
----------------
MaskRay wrote:
> Switch to opaque pointers (https://llvm.org/docs/OpaquePointers.html)
The tests all should use opaque pointers now, thanks!
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D32198/new/
https://reviews.llvm.org/D32198
More information about the llvm-commits
mailing list