[PATCH] D126929: Add sanitizer metadata attributes to clang IR gen.

2022-06-13 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. Thanks for the successful whack-a-moling :) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126929/new/ https://reviews.llvm.org/D126929 ___ cfe-commits mailing list cfe-commits@lis

[PATCH] D126929: Add sanitizer metadata attributes to clang IR gen.

2022-06-13 Thread Mitch Phillips via Phabricator via cfe-commits
hctim added a comment. LGTM: http://45.33.8.238/win/60042/summary.html Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126929/new/ https://reviews.llvm.org/D126929 ___ cfe-commits mailing list cfe-commits@

[PATCH] D126929: Add sanitizer metadata attributes to clang IR gen.

2022-06-13 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. Ping – windows bots are still red. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126929/new/ https://reviews.llvm.org/D126929 ___ cfe-commits mailing list cfe-commits@lists.llvm.o

[PATCH] D126929: Add sanitizer metadata attributes to clang IR gen.

2022-06-13 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. The reland broke fewer tests, but it still broke tests: http://45.33.8.238/win/60026/step_7.txt If you update the patch on here, the presubmit bot should also run windows tests, so you don't have to break main to find out if the patch works. Repository: rG LLVM Githu

[PATCH] D126929: Add sanitizer metadata attributes to clang IR gen.

2022-06-13 Thread Mitch Phillips via Phabricator via cfe-commits
hctim added a comment. Thanks for the heads up. Reverted, and now re-landing. Unfortunately I don't have a Windows machine so I've made my best guesses about fixing (mostly seems to just symbol name mangling / global attributes that change on the windows target). I'll keep an eye on that specif

[PATCH] D126929: Add sanitizer metadata attributes to clang IR gen.

2022-06-13 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. Looks like this breaks tests on win: http://45.33.8.238/win/60022/step_7.txt Please take a look and revert for now if takes a while to fix. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126929/new/ https://reviews.llvm.org/

[PATCH] D126929: Add sanitizer metadata attributes to clang IR gen.

2022-06-13 Thread Mitch Phillips via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGe7766972a679: Add sanitizer metadata attributes to clang IR gen. (authored by hctim). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTI

[PATCH] D126929: Add sanitizer metadata attributes to clang IR gen.

2022-06-13 Thread Mitch Phillips via Phabricator via cfe-commits
hctim updated this revision to Diff 436485. hctim added a comment. Remove one unnecessary set of brackets before submit. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126929/new/ https://reviews.llvm.org/D126929 Files: clang/lib/CodeGen/CodeGenM

[PATCH] D126929: Add sanitizer metadata attributes to clang IR gen.

2022-06-13 Thread Mitch Phillips via Phabricator via cfe-commits
hctim added inline comments. Comment at: clang/lib/CodeGen/SanitizerMetadata.cpp:101 + llvm::ConstantAsMetadata::get(llvm::ConstantInt::get( + llvm::Type::getInt1Ty(VMContext), Meta.IsDynInit)), llvm::ConstantAsMetadata::get(llvm::ConstantInt::get( --

[PATCH] D126929: Add sanitizer metadata attributes to clang IR gen.

2022-06-13 Thread Mitch Phillips via Phabricator via cfe-commits
hctim updated this revision to Diff 436484. hctim marked 4 inline comments as done. hctim added a comment. Final review touch-ups. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126929/new/ https://reviews.llvm.org/D126929 Files: clang/lib/CodeGe

[PATCH] D126929: Add sanitizer metadata attributes to clang IR gen.

2022-06-10 Thread Vitaly Buka via Phabricator via cfe-commits
vitalybuka added inline comments. Comment at: clang/lib/CodeGen/SanitizerMetadata.cpp:34 + +static void expandKernelSanitizerMasks(SanitizerMask *Mask) { + if (*Mask & (SanitizerKind::Address | SanitizerKind::KernelAddress)) Prefer return value to output paramet

[PATCH] D126929: Add sanitizer metadata attributes to clang IR gen.

2022-06-09 Thread Mitch Phillips via Phabricator via cfe-commits
hctim updated this revision to Diff 435671. hctim added a comment. And some small diff-reducing touch ups Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126929/new/ https://reviews.llvm.org/D126929 Files: clang/lib/CodeGen/CodeGenModule.cpp cla

[PATCH] D126929: Add sanitizer metadata attributes to clang IR gen.

2022-06-09 Thread Mitch Phillips via Phabricator via cfe-commits
hctim updated this revision to Diff 435669. hctim added a comment. Remove two unnecessary braces. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126929/new/ https://reviews.llvm.org/D126929 Files: clang/lib/CodeGen/CodeGenModule.cpp clang/lib/C

[PATCH] D126929: Add sanitizer metadata attributes to clang IR gen.

2022-06-09 Thread Mitch Phillips via Phabricator via cfe-commits
hctim updated this revision to Diff 435667. hctim marked 3 inline comments as done. hctim added a comment. update Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126929/new/ https://reviews.llvm.org/D126929 Files: clang/lib/CodeGen/CodeGenModule.c

[PATCH] D126929: Add sanitizer metadata attributes to clang IR gen.

2022-06-09 Thread Mitch Phillips via Phabricator via cfe-commits
hctim marked 10 inline comments as done. hctim added inline comments. Comment at: clang/lib/CodeGen/CodeGenModule.cpp:2767-2781 + if (NoSanitizeL.containsGlobal(LangOpts.Sanitize.Mask, GV->getName(), Category)) return true; - if (NoSanitizeL.containsLocation(EnabledAsanMa

[PATCH] D126929: Add sanitizer metadata attributes to clang IR gen.

2022-06-08 Thread Vitaly Buka via Phabricator via cfe-commits
vitalybuka added inline comments. Comment at: clang/lib/CodeGen/SanitizerMetadata.cpp:55 + + bool IsExcluded = CGM.isInNoSanitizeList(GV, Loc, Ty); + IsExcluded |= (NoSanitizeMask == SanitizerKind::All); vitalybuka wrote: > it can be in some weird ubsan check i

[PATCH] D126929: Add sanitizer metadata attributes to clang IR gen.

2022-06-08 Thread Vitaly Buka via Phabricator via cfe-commits
vitalybuka added a comment. No need to recover my snapshot, I'll just comment here. Comment at: clang/lib/CodeGen/SanitizerMetadata.cpp:20 +using GlobalVariable = llvm::GlobalVariable; +using GVSanitizerMetadata = GlobalVariable::SanitizerMetadata; Seems inco

[PATCH] D126929: Add sanitizer metadata attributes to clang IR gen.

2022-06-08 Thread Vitaly Buka via Phabricator via cfe-commits
vitalybuka added a comment. In D126929#3567491 , @hctim wrote: > Update. Sorry if it want clear that I some changes. You undone my snapshot. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126929/new/ https

[PATCH] D126929: Add sanitizer metadata attributes to clang IR gen.

2022-06-08 Thread Mitch Phillips via Phabricator via cfe-commits
hctim updated this revision to Diff 435257. hctim marked 3 inline comments as done. hctim added a comment. Update. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126929/new/ https://reviews.llvm.org/D126929 Files: clang/lib/CodeGen/SanitizerMetad

[PATCH] D126929: Add sanitizer metadata attributes to clang IR gen.

2022-06-08 Thread Mitch Phillips via Phabricator via cfe-commits
hctim marked 3 inline comments as done. hctim added inline comments. Comment at: clang/lib/CodeGen/CodeGenModule.cpp:2767-2781 + if (NoSanitizeL.containsGlobal(LangOpts.Sanitize.Mask, GV->getName(), Category)) return true; - if (NoSanitizeL.containsLocation(EnabledAsanMas

[PATCH] D126929: Add sanitizer metadata attributes to clang IR gen.

2022-06-07 Thread Vitaly Buka via Phabricator via cfe-commits
vitalybuka added a comment. I simplified this a little bit, but I guess this is effectively the same. Comment at: clang/lib/CodeGen/CodeGenModule.cpp:2767-2781 + if (NoSanitizeL.containsGlobal(LangOpts.Sanitize.Mask, GV->getName(), Category)) return true; - if (NoSaniti

[PATCH] D126929: Add sanitizer metadata attributes to clang IR gen.

2022-06-07 Thread Vitaly Buka via Phabricator via cfe-commits
vitalybuka updated this revision to Diff 434956. vitalybuka added a comment. rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126929/new/ https://reviews.llvm.org/D126929 Files: clang/lib/CodeGen/CodeGenModule.cpp clang/lib/CodeGen/Sanitiz

[PATCH] D126929: Add sanitizer metadata attributes to clang IR gen.

2022-06-06 Thread Mitch Phillips via Phabricator via cfe-commits
hctim updated this revision to Diff 434546. hctim added a comment. Rebased. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126929/new/ https://reviews.llvm.org/D126929 Files: clang/lib/CodeGen/CGDecl.cpp clang/lib/CodeGen/CodeGenModule.cpp cl

[PATCH] D126929: Add sanitizer metadata attributes to clang IR gen.

2022-06-03 Thread Vitaly Buka via Phabricator via cfe-commits
vitalybuka requested changes to this revision. vitalybuka added a comment. This revision now requires changes to proceed. Can you please rebase this patch onto others two? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126929/new/ https://reviews.ll

[PATCH] D126929: Add sanitizer metadata attributes to clang IR gen.

2022-06-03 Thread Kirill Stoimenov via Phabricator via cfe-commits
kstoimenov accepted this revision. kstoimenov added a comment. This revision is now accepted and ready to land. Please get approval from vitalybuka@ before submitting. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126929/new/ https://reviews.llvm.o

[PATCH] D126929: Add sanitizer metadata attributes to clang IR gen.

2022-06-03 Thread Mitch Phillips via Phabricator via cfe-commits
hctim updated this revision to Diff 434145. hctim marked 2 inline comments as done. hctim added a comment. Herald added subscribers: llvm-commits, ormris, jdoerfert, steven_wu, hiraditya. Herald added a project: LLVM. Add TODO() comments from Kirill's notes. Repository: rG LLVM Github Monorepo

[PATCH] D126929: Add sanitizer metadata attributes to clang IR gen.

2022-06-03 Thread Kirill Stoimenov via Phabricator via cfe-commits
kstoimenov added inline comments. Comment at: clang/lib/CodeGen/SanitizerMetadata.cpp:48-50 + GVSanitizerMetadata Meta; + if (GV->hasSanitizerMetadata()) +Meta = GV->getSanitizerMetadata(); hctim wrote: > kstoimenov wrote: > > Would it make sense to create

[PATCH] D126929: Add sanitizer metadata attributes to clang IR gen.

2022-06-03 Thread Mitch Phillips via Phabricator via cfe-commits
hctim marked an inline comment as done. hctim added inline comments. Comment at: clang/lib/CodeGen/SanitizerMetadata.cpp:48-50 + GVSanitizerMetadata Meta; + if (GV->hasSanitizerMetadata()) +Meta = GV->getSanitizerMetadata(); kstoimenov wrote: > Would it mak

[PATCH] D126929: Add sanitizer metadata attributes to clang IR gen.

2022-06-03 Thread Kirill Stoimenov via Phabricator via cfe-commits
kstoimenov added inline comments. Comment at: clang/lib/CodeGen/SanitizerMetadata.cpp:48-50 + GVSanitizerMetadata Meta; + if (GV->hasSanitizerMetadata()) +Meta = GV->getSanitizerMetadata(); Would it make sense to create two separate functions something like

[PATCH] D126929: Add sanitizer metadata attributes to clang IR gen.

2022-06-02 Thread Mitch Phillips via Phabricator via cfe-commits
hctim created this revision. hctim added reviewers: vitalybuka, kstoimenov. Herald added a project: All. hctim requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This patch adds generation of sanitizer metadata attributes (which were added in