Page MenuHomePhabricator
Feed Advanced Search

Apr 6 2021

guiand added a comment to D82317: [Clang/Test]: Update tests where `noundef` attribute is necessary.

Sorry, I must've missed this. @aqjune, if you'd be willing to take on this change, that would be amazing (I haven't got much time to update these patches lately).

Apr 6 2021, 11:50 AM · Restricted Project

Mar 5 2021

guiand abandoned D85788: [Clang test] Update to allow passing extra default clang arguments in use_clang.

We decided to go with a positive flag for enabling noundef, so I'm closing this.

Mar 5 2021, 1:59 PM · Restricted Project, Restricted Project

Mar 4 2021

guiand committed rG10264a1b21ae: Introduce noundef attribute at call sites for stricter poison analysis (authored by guiand).
Introduce noundef attribute at call sites for stricter poison analysis
Mar 4 2021, 12:17 PM
guiand closed D81678: Introduce noundef attribute at call sites for stricter poison analysis.
Mar 4 2021, 12:17 PM · Restricted Project, Restricted Project
guiand updated the diff for D81678: Introduce noundef attribute at call sites for stricter poison analysis.
Mar 4 2021, 12:44 AM · Restricted Project, Restricted Project
guiand updated the diff for D81678: Introduce noundef attribute at call sites for stricter poison analysis.

Reupload patch to trigger build

Mar 4 2021, 12:33 AM · Restricted Project, Restricted Project

Mar 2 2021

guiand added a comment to D81678: Introduce noundef attribute at call sites for stricter poison analysis.

For sure. I'll upload a rebased patch shortly and give it another day or so for people to look, and then push if there aren't any issues.

Mar 2 2021, 11:05 AM · Restricted Project, Restricted Project

Feb 10 2021

guiand updated the diff for D81678: Introduce noundef attribute at call sites for stricter poison analysis.

Updated to use -enable-noundef-analysis

Feb 10 2021, 7:43 PM · Restricted Project, Restricted Project

Feb 4 2021

guiand added a comment to D81678: Introduce noundef attribute at call sites for stricter poison analysis.

Changing the mechanism to explicit opt-in seems like a good idea, and bypasses the test issues.

Feb 4 2021, 3:10 PM · Restricted Project, Restricted Project

Dec 9 2020

guiand added a comment to D85788: [Clang test] Update to allow passing extra default clang arguments in use_clang.

This whole thing is a little unfortunate, but maybe a better substitution would be leaving %clang as referring to the pure clang binary, with default arguments. Then we can have a %clang_cc which may only be used for a standard C compiler invocation.

Dec 9 2020, 4:09 PM · Restricted Project, Restricted Project

Oct 16 2020

guiand added a comment to D85788: [Clang test] Update to allow passing extra default clang arguments in use_clang.

Did we decide that we wanted this change then? I remember there being discussion around whether it's the right approach.

Oct 16 2020, 1:05 PM · Restricted Project, Restricted Project
guiand added inline comments to D83427: [MSAN] Update tests due to widespread eager checking.
Oct 16 2020, 1:03 PM · Restricted Project, Restricted Project

Sep 22 2020

guiand accepted rGf1746be66673: [Sanitizers] Fix test case that doesn't clean up after itself.

Sorry about the mix-up. This seems like exactly what we should do to clean up here.

Sep 22 2020, 9:28 PM

Aug 23 2020

guiand added a comment to D82317: [Clang/Test]: Update tests where `noundef` attribute is necessary.

@rjmccall We've discussed several different possibilities here. Does any of them strike you as a good step forward here?

Aug 23 2020, 11:48 PM · Restricted Project
guiand added a comment to D85894: [BuildLibCalls] Add more noundef to library functions.

LGTM, although I'm just curious about the omissions here. why not mark something like round noundef?

Aug 23 2020, 11:46 PM · Restricted Project

Aug 22 2020

guiand added inline comments to D83595: [Draft][MSAN] Optimize away poisoning allocas that are always written before load.
Aug 22 2020, 12:32 PM · Restricted Project, Restricted Project

Aug 14 2020

guiand committed rG05e3ab41e418: [MSAN] Avoid dangling ActualFnStart when replacing instruction (authored by guiand).
[MSAN] Avoid dangling ActualFnStart when replacing instruction
Aug 14 2020, 4:51 PM
guiand closed D86001: [MSAN] Avoid dangling ActualFnStart when replacing instruction.
Aug 14 2020, 4:51 PM · Restricted Project
guiand added inline comments to D86001: [MSAN] Avoid dangling ActualFnStart when replacing instruction.
Aug 14 2020, 4:40 PM · Restricted Project
guiand updated the diff for D86001: [MSAN] Avoid dangling ActualFnStart when replacing instruction.

Emit a nop instruction to always mark the end of the MSan prologue, and insert prologue instructions before that.

Aug 14 2020, 4:35 PM · Restricted Project
guiand added a comment to D86001: [MSAN] Avoid dangling ActualFnStart when replacing instruction.

Caught by http://lab.llvm.org:8011/builders/clang-ppc64be-linux-lnt/builds/41009/steps/ninja%20check%201/logs/FAIL%3A%20MemorySanitizer-POWERPC64%3A%3A%20chained_origin_memcpy.cpp

Aug 14 2020, 3:23 PM · Restricted Project
guiand requested review of D86001: [MSAN] Avoid dangling ActualFnStart when replacing instruction.
Aug 14 2020, 3:21 PM · Restricted Project
guiand committed rG36ebabc153d4: [MSAN] Convert ActualFnStart to be a particular Instruction *, not BB (authored by guiand).
[MSAN] Convert ActualFnStart to be a particular Instruction *, not BB
Aug 14 2020, 2:44 PM
guiand closed D85985: [MSAN] Convert ActualFnStart to be a particular Instruction *, not BB.
Aug 14 2020, 2:44 PM · Restricted Project
guiand updated the diff for D85985: [MSAN] Convert ActualFnStart to be a particular Instruction *, not BB.

Move removeUnreachableBlocks before inserting the prologue. This makes sure there's no issue with the ActualFnStart instruction being deleted before the visitor loop.

Aug 14 2020, 2:00 PM · Restricted Project
guiand closed D85559: [MSAN] Reintroduce libatomic load/store instrumentation.

Committed as 97de0188dd5d845ff90c8ac779a2ea09688b17df

Aug 14 2020, 1:42 PM · Restricted Project, Restricted Project, Restricted Project
guiand committed rG97de0188dd5d: [MSAN] Reintroduce libatomic load/store instrumentation (authored by guiand).
[MSAN] Reintroduce libatomic load/store instrumentation
Aug 14 2020, 1:42 PM
guiand updated the diff for D85985: [MSAN] Convert ActualFnStart to be a particular Instruction *, not BB.

Remove BB splitting for KMSAN

Aug 14 2020, 1:29 PM · Restricted Project
guiand added inline comments to D85559: [MSAN] Reintroduce libatomic load/store instrumentation.
Aug 14 2020, 12:56 PM · Restricted Project, Restricted Project, Restricted Project
guiand updated the diff for D85227: [MSAN] Cache stack traces and chained origins.

Added a test for hash codegen.

Aug 14 2020, 11:44 AM · Restricted Project, Restricted Project
guiand updated the diff for D85227: [MSAN] Cache stack traces and chained origins.

Updated to depend on https://reviews.llvm.org/D85985 (ActualFnStart becomes a Instruction *)

Aug 14 2020, 11:31 AM · Restricted Project, Restricted Project
guiand added a reviewer for D85985: [MSAN] Convert ActualFnStart to be a particular Instruction *, not BB: vitalybuka.
Aug 14 2020, 11:28 AM · Restricted Project
guiand requested review of D85985: [MSAN] Convert ActualFnStart to be a particular Instruction *, not BB.
Aug 14 2020, 11:27 AM · Restricted Project
guiand updated the diff for D85559: [MSAN] Reintroduce libatomic load/store instrumentation.

Addressed comments

Aug 14 2020, 12:52 AM · Restricted Project, Restricted Project, Restricted Project
guiand committed rG909a851dbffe: [CGAtomic] Mark atomic libcall functions `nounwind` (authored by guiand).
[CGAtomic] Mark atomic libcall functions `nounwind`
Aug 14 2020, 12:49 AM
guiand closed D85573: [CGAtomic] Mark atomic libcall functions `nounwind`.
Aug 14 2020, 12:48 AM · Restricted Project

Aug 12 2020

guiand added a comment to D82317: [Clang/Test]: Update tests where `noundef` attribute is necessary.

TBH, I don't see how this solves any problem. It just makes it a problem for someone in the future... (FWIW, I say this being in full support of noundef)

Aug 12 2020, 11:43 AM · Restricted Project

Aug 11 2020

guiand added a reviewer for D85797: Fix sigaction interceptor to always correctly populate oldact: eugenis.
Aug 11 2020, 5:13 PM · Restricted Project
guiand updated the diff for D81678: Introduce noundef attribute at call sites for stricter poison analysis.

Made the compiler flag non-public

Aug 11 2020, 4:20 PM · Restricted Project, Restricted Project
guiand updated the diff for D85788: [Clang test] Update to allow passing extra default clang arguments in use_clang.

Allows passing different extra arguments for different clang expansions

Aug 11 2020, 4:18 PM · Restricted Project, Restricted Project
guiand updated the diff for D85573: [CGAtomic] Mark atomic libcall functions `nounwind`.

Added willreturn. I think nocapture is probably best left to a future change since it's more invasive -- it would require keeping tabs of which arguments to each function is a pointer arg.

Aug 11 2020, 3:42 PM · Restricted Project
guiand requested review of D81678: Introduce noundef attribute at call sites for stricter poison analysis.

I think I'd like someone to take a look at the llvm-lit changes to see if this makes sense as an approach

Aug 11 2020, 3:07 PM · Restricted Project, Restricted Project
guiand updated the diff for D81678: Introduce noundef attribute at call sites for stricter poison analysis.

To try to alleviate the tests issue, @eugenis and I discussed that it might be best to take it slow. So now this patch will mask off emitting the attribute on clang tests by default.

Aug 11 2020, 3:06 PM · Restricted Project, Restricted Project
guiand added a comment to D82317: [Clang/Test]: Update tests where `noundef` attribute is necessary.

After discussing with @eugenis, for the meantime it might be best to do the following:

  • Change the masking attribute to be -fdisable-noundef-analysis (name notwithstanding), and have it completely turn off all noundefs
  • Change the llvm-lit configuration to use the new codegen flag for all the tests by default
  • Have noundef emitted in the frontend by default (when the codegen flag isn't present)
Aug 11 2020, 2:42 PM · Restricted Project
guiand requested review of D85788: [Clang test] Update to allow passing extra default clang arguments in use_clang.
Aug 11 2020, 2:35 PM · Restricted Project, Restricted Project
guiand resigned from D85768: [Utils] Add highlighting definition for byref IR attribute.

LGTM, but I don't really maintain this code.

Aug 11 2020, 12:36 PM · Restricted Project

Aug 10 2020

guiand added a comment to D85573: [CGAtomic] Mark atomic libcall functions `nounwind`.

I don't think we can necessarily guarantee argmemonly/readonly/writeonly, particularly since these library calls can take a lock somewhere inside. I'll definitely add nocapture and willreturn though.

Aug 10 2020, 1:29 PM · Restricted Project
guiand committed rGc0b5000bd848: [MSAN RT] Use __sanitizer::mem_is_zero in __msan_test_shadow (authored by guiand).
[MSAN RT] Use __sanitizer::mem_is_zero in __msan_test_shadow
Aug 10 2020, 12:23 PM
guiand closed D84961: [MSAN RT] Use __sanitizer::mem_is_zero in __msan_test_shadow.
Aug 10 2020, 12:23 PM · Restricted Project
guiand updated the diff for D84961: [MSAN RT] Use __sanitizer::mem_is_zero in __msan_test_shadow.

Addressed comments

Aug 10 2020, 12:05 PM · Restricted Project
guiand updated the diff for D85227: [MSAN] Cache stack traces and chained origins.

Addressed comments. For handling number of uses per stack trace, this uses a bit of a heuristic:

Aug 10 2020, 10:14 AM · Restricted Project, Restricted Project

Aug 7 2020

guiand added inline comments to D85559: [MSAN] Reintroduce libatomic load/store instrumentation.
Aug 7 2020, 5:27 PM · Restricted Project, Restricted Project, Restricted Project
guiand updated the diff for D85559: [MSAN] Reintroduce libatomic load/store instrumentation.

Separated out the frontend change. Addressed other comments.

Aug 7 2020, 5:26 PM · Restricted Project, Restricted Project, Restricted Project
guiand requested review of D85573: [CGAtomic] Mark atomic libcall functions `nounwind`.
Aug 7 2020, 5:10 PM · Restricted Project
guiand updated the diff for D85559: [MSAN] Reintroduce libatomic load/store instrumentation.

Rebased on master (again)

Aug 7 2020, 3:54 PM · Restricted Project, Restricted Project, Restricted Project
guiand updated the diff for D85559: [MSAN] Reintroduce libatomic load/store instrumentation.

Rebased on master

Aug 7 2020, 3:52 PM · Restricted Project, Restricted Project, Restricted Project
guiand updated the diff for D85559: [MSAN] Reintroduce libatomic load/store instrumentation.

Simplified by returning to the old implementation, but having libatomic calls made nounwind (so we never see them as invokes).

Aug 7 2020, 3:50 PM · Restricted Project, Restricted Project, Restricted Project
guiand added inline comments to D85559: [MSAN] Reintroduce libatomic load/store instrumentation.
Aug 7 2020, 2:34 PM · Restricted Project, Restricted Project, Restricted Project
guiand requested review of D85559: [MSAN] Reintroduce libatomic load/store instrumentation.
Aug 7 2020, 2:33 PM · Restricted Project, Restricted Project, Restricted Project
guiand added a reverting change for rG33d239513c88: [MSAN] Instrument libatomic load/store calls: rG17ff170e3a9b: Revert "[MSAN] Instrument libatomic load/store calls".
Aug 7 2020, 12:48 PM
guiand committed rG17ff170e3a9b: Revert "[MSAN] Instrument libatomic load/store calls" (authored by guiand).
Revert "[MSAN] Instrument libatomic load/store calls"
Aug 7 2020, 12:48 PM
guiand added a reverting change for D83337: [MSAN] Instrument libatomic load/store calls: rG17ff170e3a9b: Revert "[MSAN] Instrument libatomic load/store calls".
Aug 7 2020, 12:47 PM · Restricted Project, Restricted Project

Aug 6 2020

guiand updated the diff for D84961: [MSAN RT] Use __sanitizer::mem_is_zero in __msan_test_shadow.

Modified to just use __sanitizer::mem_is_zero

Aug 6 2020, 6:20 PM · Restricted Project
guiand added a comment to D82317: [Clang/Test]: Update tests where `noundef` attribute is necessary.

Most of the discussion has been in https://reviews.llvm.org/D81678 (implementing the attribute in clang) and https://reviews.llvm.org/D82316 (adding the attribute to langref).

Aug 6 2020, 3:04 PM · Restricted Project
guiand added a comment to D82317: [Clang/Test]: Update tests where `noundef` attribute is necessary.

At the very least, make whatever script you used to update these public, as I don't want to have to recreate it from scratch when merging this in. I had enough "fun" with the LLD mass-renaming (UpperCamel -> lowerCamel) and that was _with_ a supposedly-working script (it didn't quite do the right thing and I seem to recall there being two refactoring commits, only one of which had a script); I do not want a repeat of that experience.

Aug 6 2020, 1:23 PM · Restricted Project
guiand added a comment to D82317: [Clang/Test]: Update tests where `noundef` attribute is necessary.

Are you seriously adding an attribute to literally every argument and return value? Why is this the right representation?

Aug 6 2020, 1:16 PM · Restricted Project

Aug 5 2020

guiand accepted D85350: [msan] Support %ms in scanf..
Aug 5 2020, 12:55 PM · Restricted Project
guiand added a comment to D85350: [msan] Support %ms in scanf..

LGTM. Does this support the a format specifier as well, or just m?

Aug 5 2020, 12:55 PM · Restricted Project

Aug 4 2020

guiand accepted D85259: [msan] Remove readnone and friends from call sites..

LGTM

Aug 4 2020, 5:11 PM · Restricted Project
guiand added inline comments to D83595: [Draft][MSAN] Optimize away poisoning allocas that are always written before load.
Aug 4 2020, 11:53 AM · Restricted Project, Restricted Project
guiand updated the diff for D83595: [Draft][MSAN] Optimize away poisoning allocas that are always written before load.

Integrated with Alias Analyzer, uses simpler mechanism for walking through BB and determining stores to alloca

Aug 4 2020, 11:47 AM · Restricted Project, Restricted Project
guiand added inline comments to D85227: [MSAN] Cache stack traces and chained origins.
Aug 4 2020, 10:37 AM · Restricted Project, Restricted Project
guiand requested review of D85227: [MSAN] Cache stack traces and chained origins.
Aug 4 2020, 10:35 AM · Restricted Project, Restricted Project

Aug 3 2020

guiand committed rGcaf002c7be44: [Utils] Add noundef attribute to vim/emacs/vscode syntax scripts (authored by guiand).
[Utils] Add noundef attribute to vim/emacs/vscode syntax scripts
Aug 3 2020, 9:47 AM
guiand closed D84553: [Utils] Add noundef attribute to vim/emacs syntax scripts.
Aug 3 2020, 9:46 AM · Restricted Project
guiand committed rG3ebd1ba64f3d: [MSAN] Instrument freeze instruction by clearing shadow (authored by guiand).
[MSAN] Instrument freeze instruction by clearing shadow
Aug 3 2020, 9:42 AM
guiand closed D85040: [MSAN] Instrument freeze instruction by clearing shadow.
Aug 3 2020, 9:42 AM · Restricted Project

Jul 31 2020

guiand added a comment to D83595: [Draft][MSAN] Optimize away poisoning allocas that are always written before load.

It seems like collectInitializers leans heavily on the isPointerOffset function, which returns an offset if two pointers have a constant difference, nullopt if they don't. The problem here is that we can't distinguish isPointerOffset == nullopt happening because the offset is determined at runtime, or because the two pointers are completely unrelated.

Jul 31 2020, 5:42 PM · Restricted Project, Restricted Project
guiand updated the diff for D85040: [MSAN] Instrument freeze instruction by clearing shadow.

Updated.

Jul 31 2020, 3:38 PM · Restricted Project
guiand added a comment to D85040: [MSAN] Instrument freeze instruction by clearing shadow.

Oh, wait, the patch didn't update. One sec.

Jul 31 2020, 3:38 PM · Restricted Project
guiand updated the diff for D85040: [MSAN] Instrument freeze instruction by clearing shadow.

Fixed to actually set the shadow and origin. Sorry for the mix-up!

Jul 31 2020, 3:37 PM · Restricted Project
guiand updated the diff for D82317: [Clang/Test]: Update tests where `noundef` attribute is necessary.

Rebased; all tests passing again. Removed the change to the ppc-*mmintrin.c tests, instead I just use the -disable-noundef-args flag`. Cleaned up typos.

Jul 31 2020, 3:11 PM · Restricted Project
guiand added a comment to D85040: [MSAN] Instrument freeze instruction by clearing shadow.

Oh! I need to test that it's not checked as well.

Jul 31 2020, 2:55 PM · Restricted Project
guiand added a comment to D83595: [Draft][MSAN] Optimize away poisoning allocas that are always written before load.

In general, this implementation looks pretty complex and easy to get wrong. I'd prefer something along the lines of AArch64StackTagging::collectInitializers - directly calculate the offset for each store/load instruction. It might do some extra work with unrelated memory instructions, but probably not too much.

Jul 31 2020, 2:54 PM · Restricted Project, Restricted Project
guiand updated the diff for D83595: [Draft][MSAN] Optimize away poisoning allocas that are always written before load.

Flattened some control flow, updated to properly use StoreOffs, and updated tests to cover chained GEPs

Jul 31 2020, 2:43 PM · Restricted Project, Restricted Project
guiand requested review of D85040: [MSAN] Instrument freeze instruction by clearing shadow.
Jul 31 2020, 11:55 AM · Restricted Project

Jul 30 2020

guiand updated the diff for D83595: [Draft][MSAN] Optimize away poisoning allocas that are always written before load.

I've cut it down to only within a basic block as @eugenis and @vitalybuka suggested.

Jul 30 2020, 6:40 PM · Restricted Project, Restricted Project
guiand added inline comments to D83595: [Draft][MSAN] Optimize away poisoning allocas that are always written before load.
Jul 30 2020, 3:47 PM · Restricted Project, Restricted Project
guiand added inline comments to D83595: [Draft][MSAN] Optimize away poisoning allocas that are always written before load.
Jul 30 2020, 3:21 PM · Restricted Project, Restricted Project
guiand added inline comments to D83595: [Draft][MSAN] Optimize away poisoning allocas that are always written before load.
Jul 30 2020, 3:15 PM · Restricted Project, Restricted Project
guiand added a comment to D83595: [Draft][MSAN] Optimize away poisoning allocas that are always written before load.

This actually has very significant effects on some, but not all, benchmarks.

Jul 30 2020, 11:56 AM · Restricted Project, Restricted Project
guiand requested review of D84961: [MSAN RT] Use __sanitizer::mem_is_zero in __msan_test_shadow.
Jul 30 2020, 11:26 AM · Restricted Project
guiand added a comment to D82317: [Clang/Test]: Update tests where `noundef` attribute is necessary.

@jdoerfert what would the procedure be for reviewing these test changes / getting this landed with the noundef patch?

Jul 30 2020, 9:43 AM · Restricted Project

Jul 29 2020

guiand abandoned D83499: [MSAN runtime] Add poison_stack function that also updates origin.

I agree, this probably isn't going to be worth it.

Jul 29 2020, 11:41 AM · Restricted Project, Restricted Project
guiand added inline comments to D81678: Introduce noundef attribute at call sites for stricter poison analysis.
Jul 29 2020, 11:18 AM · Restricted Project, Restricted Project
guiand updated the diff for D81678: Introduce noundef attribute at call sites for stricter poison analysis.

Updated comment on disable-noundef-args option

Jul 29 2020, 11:16 AM · Restricted Project, Restricted Project
guiand updated the diff for D81678: Introduce noundef attribute at call sites for stricter poison analysis.

Addressed comments

Jul 29 2020, 11:13 AM · Restricted Project, Restricted Project

Jul 28 2020

guiand updated the diff for D82317: [Clang/Test]: Update tests where `noundef` attribute is necessary.

All tests up to date. Of particular note are the ppc-*mmintrin.c tests, which seemed to drastically change upon rerunning the test autogen script.

Jul 28 2020, 6:53 PM · Restricted Project
guiand updated the diff for D81678: Introduce noundef attribute at call sites for stricter poison analysis.

Fix typo in MayDropFunctionReturn

Jul 28 2020, 1:23 PM · Restricted Project, Restricted Project
guiand updated the diff for D81678: Introduce noundef attribute at call sites for stricter poison analysis.

Fixes regression; allows emitting noundef for non-FunctionDecls as well.

Jul 28 2020, 12:08 PM · Restricted Project, Restricted Project