[PATCH] D148654: Modify BoundsSan to improve debuggability

2023-09-26 Thread Vitaly Buka via Phabricator via cfe-commits
vitalybuka resigned from this revision. vitalybuka added a comment. I assume we moved to https://github.com/llvm/llvm-project/pull/65972 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148654/new/ https://reviews.llvm.org/D148654 ___

[PATCH] D148654: Modify BoundsSan to improve debuggability

2023-09-11 Thread Oskar Wirga via Phabricator via cfe-commits
oskarwirga added inline comments. Comment at: clang/lib/CodeGen/CGExpr.cpp:47 #include "llvm/Transforms/Utils/SanitizerStats.h" #include vitalybuka wrote: > this file and BoundsChecking.cpp belong to different patches Just to be clear on terms here, these ch

[PATCH] D148654: Modify BoundsSan to improve debuggability

2023-09-07 Thread Vitaly Buka via Phabricator via cfe-commits
vitalybuka added inline comments. Comment at: clang/lib/CodeGen/CGExpr.cpp:47 #include "llvm/Transforms/Utils/SanitizerStats.h" #include this file and BoundsChecking.cpp belong to different patches Comment at: clang/lib/CodeGen/CGExpr.cpp:

[PATCH] D148654: Modify BoundsSan to improve debuggability

2023-09-05 Thread Oskar Wirga via Phabricator via cfe-commits
oskarwirga added a comment. ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148654/new/ https://reviews.llvm.org/D148654 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/

[PATCH] D148654: Modify BoundsSan to improve debuggability

2023-08-15 Thread Oskar Wirga via Phabricator via cfe-commits
oskarwirga updated this revision to Diff 550355. oskarwirga added a comment. Fix clang crash and retest Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148654/new/ https://reviews.llvm.org/D148654 Files: clang/lib/CodeGen/CGExpr.cpp clang/test/C

[PATCH] D148654: Modify BoundsSan to improve debuggability

2023-07-24 Thread Oskar Wirga via Phabricator via cfe-commits
oskarwirga updated this revision to Diff 543557. oskarwirga added a comment. Properly refactor the code bc my last attempt was flawed -_- Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148654/new/ https://reviews.llvm.org/D148654 Files: clang/lib

[PATCH] D148654: Modify BoundsSan to improve debuggability

2023-07-21 Thread Oskar Wirga via Phabricator via cfe-commits
oskarwirga added a comment. ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148654/new/ https://reviews.llvm.org/D148654 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/

[PATCH] D148654: Modify BoundsSan to improve debuggability

2023-07-13 Thread Oskar Wirga via Phabricator via cfe-commits
oskarwirga added inline comments. Comment at: clang/lib/CodeGen/CGExpr.cpp:3594 +TrapCall->addFnAttr(A); + } + TrapCall->setDoesNotReturn(); aeubanks wrote: > oskarwirga wrote: > > vitalybuka wrote: > > > wouldn't be you issues solved with > > >

[PATCH] D148654: Modify BoundsSan to improve debuggability

2023-07-13 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks added inline comments. Comment at: clang/lib/CodeGen/CGExpr.cpp:3594 +TrapCall->addFnAttr(A); + } + TrapCall->setDoesNotReturn(); oskarwirga wrote: > vitalybuka wrote: > > wouldn't be you issues solved with > > TrapCall->setCannotMerge(

[PATCH] D148654: Modify BoundsSan to improve debuggability

2023-07-13 Thread Oskar Wirga via Phabricator via cfe-commits
oskarwirga updated this revision to Diff 540181. oskarwirga added a comment. Refactor CodeGen code Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148654/new/ https://reviews.llvm.org/D148654 Files: clang/lib/CodeGen/CGExpr.cpp clang/test/CodeGe

[PATCH] D148654: Modify BoundsSan to improve debuggability

2023-07-13 Thread Oskar Wirga via Phabricator via cfe-commits
oskarwirga added inline comments. Comment at: clang/lib/CodeGen/CGExpr.cpp:3576-3597 +if (TrapBBs.size() <= CheckHandlerID) + TrapBBs.resize(CheckHandlerID + 1); +llvm::BasicBlock *&TrapBB = TrapBBs[CheckHandlerID]; + +if (!CGM.getCodeGenOpts().OptimizationLevel

[PATCH] D148654: Modify BoundsSan to improve debuggability

2023-07-13 Thread Vitaly Buka via Phabricator via cfe-commits
vitalybuka added inline comments. Comment at: clang/lib/CodeGen/CGExpr.cpp:3576-3597 +if (TrapBBs.size() <= CheckHandlerID) + TrapBBs.resize(CheckHandlerID + 1); +llvm::BasicBlock *&TrapBB = TrapBBs[CheckHandlerID]; + +if (!CGM.getCodeGenOpts().OptimizationLevel

[PATCH] D148654: Modify BoundsSan to improve debuggability

2023-07-05 Thread Oskar Wirga via Phabricator via cfe-commits
oskarwirga added a comment. ping :) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148654/new/ https://reviews.llvm.org/D148654 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.o

[PATCH] D148654: Modify BoundsSan to improve debuggability

2023-05-24 Thread Oskar Wirga via Phabricator via cfe-commits
oskarwirga added a comment. Jobs are now passing, CC: @nlopes @chandlerc @jgalenson for review :) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148654/new/ https://reviews.llvm.org/D148654 ___ cfe-commit

[PATCH] D148654: Modify BoundsSan to improve debuggability

2023-05-12 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai added inline comments. Comment at: llvm/lib/Transforms/Instrumentation/BoundsChecking.cpp:189 auto GetTrapBB = [&TrapBB](BuilderTy &IRB) { -if (TrapBB && SingleTrapBB) - return TrapBB; - -Function *Fn = IRB.GetInsertBlock()->getParent(); -// FIXME: Thi

[PATCH] D148654: Modify BoundsSan to improve debuggability

2023-05-12 Thread Oskar Wirga via Phabricator via cfe-commits
oskarwirga added inline comments. Comment at: llvm/lib/Transforms/Instrumentation/BoundsChecking.cpp:189 auto GetTrapBB = [&TrapBB](BuilderTy &IRB) { -if (TrapBB && SingleTrapBB) - return TrapBB; - -Function *Fn = IRB.GetInsertBlock()->getParent(); -// FIXME:

[PATCH] D148654: Modify BoundsSan to improve debuggability

2023-05-12 Thread Nuno Lopes via Phabricator via cfe-commits
nlopes added inline comments. Comment at: llvm/lib/Transforms/Instrumentation/BoundsChecking.cpp:189 auto GetTrapBB = [&TrapBB](BuilderTy &IRB) { -if (TrapBB && SingleTrapBB) - return TrapBB; - -Function *Fn = IRB.GetInsertBlock()->getParent(); -// FIXME: This

[PATCH] D148654: Modify BoundsSan to improve debuggability

2023-05-12 Thread Oskar Wirga via Phabricator via cfe-commits
oskarwirga updated this revision to Diff 521767. oskarwirga added a comment. Add full context Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148654/new/ https://reviews.llvm.org/D148654 Files: clang/lib/CodeGen/CGExpr.cpp clang/test/CodeGen/bou

[PATCH] D148654: Modify BoundsSan to improve debuggability

2023-05-12 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai added a reviewer: melver. smeenai added a comment. The patch should be uploaded with full context to make review easier. Adding another potential reviewer. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148654/new/ https://reviews.llvm.org/

[PATCH] D148654: Modify BoundsSan to improve debuggability

2023-05-12 Thread Oskar Wirga via Phabricator via cfe-commits
oskarwirga added a comment. CC: @nlopes @chandlerc @jgalenson I have y'all added here because of your past work on BoundsSan, if you know of anyone else who may be able to provide review please tag them! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.or

[PATCH] D148654: Modify BoundsSan to improve debuggability

2023-05-11 Thread Oskar Wirga via Phabricator via cfe-commits
oskarwirga updated this revision to Diff 521525. oskarwirga added a comment. clang-format 😺 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148654/new/ https://reviews.llvm.org/D148654 Files: clang/lib/CodeGen/CGExpr.cpp clang/test/CodeGen/bound

[PATCH] D148654: Modify BoundsSan to improve debuggability

2023-05-10 Thread Oskar Wirga via Phabricator via cfe-commits
oskarwirga updated this revision to Diff 521180. oskarwirga added a comment. Rebase on trunk :) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148654/new/ https://reviews.llvm.org/D148654 Files: clang/lib/CodeGen/CGExpr.cpp clang/test/CodeGen/b

[PATCH] D148654: Modify BoundsSan to improve debuggability

2023-05-03 Thread Oskar Wirga via Phabricator via cfe-commits
oskarwirga updated this revision to Diff 519190. oskarwirga edited the summary of this revision. oskarwirga added a comment. Turns out the lowering of ubsantrap() to a single instruction resulted in binaries that did NOT have nonmerged traps, so this is going back to what we had before. I also a

[PATCH] D148654: Modify BoundsSan to improve debuggability

2023-05-02 Thread Oskar Wirga via Phabricator via cfe-commits
oskarwirga updated this revision to Diff 518933. oskarwirga edited the summary of this revision. oskarwirga added a comment. Update the diff to use the `nomerge` attribute CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148654/new/ https://reviews.llvm.org/D148654 Files: clang/lib/Code

[PATCH] D148654: Modify BoundsSan to improve debuggability

2023-05-02 Thread Oskar Wirga via Phabricator via cfe-commits
oskarwirga added a comment. In D148654#4312478 , @smeenai wrote: > Thinking about this a bit more, should the trap not have an associated stack > trace that can be symbolicated to tell you which line of code was crashing? > If the issue is that multiple

[PATCH] D148654: Modify BoundsSan to improve debuggability

2023-05-02 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai added a comment. Thinking about this a bit more, should the trap not have an associated stack trace that can be symbolicated to tell you which line of code was crashing? If the issue is that multiple traps can get folded together, the `nomerge` attribute (D78659

[PATCH] D148654: Modify BoundsSan to improve debuggability

2023-05-01 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai added a comment. You should upload this with full context and add some test cases :) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148654/new/ https://reviews.llvm.org/D148654 ___ cfe-commits mai