[PATCH] D118171: [HWASan] Add __hwasan_init to .preinit_array.

2022-02-03 Thread Matt Morehouse 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 rG95d609b549bb: [HWASan] Add __hwasan_init to .preinit_array. (authored by morehouse). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTIO

[PATCH] D118171: [HWASan] Add __hwasan_init to .preinit_array.

2022-02-02 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse added inline comments. Comment at: clang/lib/Driver/ToolChains/CommonArgs.cpp:842 + if (!Args.hasArg(options::OPT_shared)) +SharedRuntimes.push_back("hwasan-preinit"); } eugenis wrote: > pcc wrote: > > Shouldn't it be added to `HelperS

[PATCH] D118171: [HWASan] Add __hwasan_init to .preinit_array.

2022-02-02 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse updated this revision to Diff 405435. morehouse marked 3 inline comments as done. morehouse added a comment. - Make __local_hwasan_preinit static. - Use HelperStaticRuntimes. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D118171/new/ https

[PATCH] D118171: [HWASan] Add __hwasan_init to .preinit_array.

2022-02-02 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse updated this revision to Diff 405283. morehouse added a comment. Herald added a project: clang. Herald added a subscriber: cfe-commits. - In shared library mode, link preinit stub with every DSO. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.or

[PATCH] D117809: [clang] Add an extract-api driver option

2022-01-26 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse added inline comments. Comment at: clang/lib/Frontend/ExtractAPIConsumer.cpp:20 +private: + ASTContext *Context; +}; `ASTContext *Context` is unused, and causing buildbot failures: https://lab.llvm.org/buildbot/#/builders/77/builds/13645 ``` /var/li

[PATCH] D117177: [NFC][DFSan] Update DataFlowSanitizer user docs for -dfsan-conditional-callbacks, added in https://reviews.llvm.org/D116207

2022-01-13 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse accepted this revision. morehouse added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117177/new/ https://reviews.llvm.org/D117177 _

[PATCH] D114312: libfuzzer: Disable broken tests for arm

2021-11-22 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse accepted this revision. morehouse added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114312/new/ https://reviews.llvm.org/D114312 _

[PATCH] D112091: libfuzzer: All building libfuzzer for ARM32

2021-11-18 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse accepted this revision. morehouse added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112091/new/ https://reviews.llvm.org/D112091 _

[PATCH] D113447: [sancov] add tracing for loads and store

2021-11-09 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse accepted this revision. morehouse added a comment. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D113447/new/ https://reviews.llvm.org/D113447 ___ cfe-commits mailing list cfe-commits@lists

[PATCH] D113447: [sancov] add tracing for loads and store

2021-11-09 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse accepted this revision. morehouse added inline comments. This revision is now accepted and ready to land. Comment at: clang/test/Driver/autocomplete.c:73 // FNOSANICOVERALL-NEXT: trace-pc-guard +// FNOSANICOVERALL-NEXT: trace-loads +// FNOSANICOVERALL-NEXT: trace-store

[PATCH] D111344: [HWASan] Use tagged-globals feature on x86.

2021-10-19 Thread Matt Morehouse via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGe1e2635327d7: [HWASan] Use tagged-globals feature on x86. (authored by morehouse). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111344/new/ https://reviews

[PATCH] D111344: [HWASan] Use tagged-globals feature on x86.

2021-10-07 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse created this revision. morehouse added reviewers: pcc, eugenis, vitalybuka. morehouse requested review of this revision. Herald added projects: clang, Sanitizers. Herald added subscribers: Sanitizers, cfe-commits. Allows us to use the small code model when we disable relocation relaxatio

[PATCH] D111256: [NFC][sanitizer] Remove global PersistentAllocator

2021-10-07 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse accepted this revision. morehouse added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111256/new/ https://reviews.llvm.org/D111256 _

[PATCH] D111256: [NFC][sanitizer] Remove global PersistentAllocator

2021-10-06 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse added inline comments. Comment at: compiler-rt/lib/sanitizer_common/sanitizer_persistent_allocator.h:61 uptr mem = (uptr)MmapOrDie(allocsz, "stack depot"); +atomic_fetch_add(&allocated_size, allocsz, memory_order_relaxed); atomic_store(®ion_end, mem + allo

[PATCH] D109847: [DFSan] Add force_zero_label abilist option to DFSan. This can be used as a work-around for overtainting.

2021-09-17 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse accepted this revision. morehouse added inline comments. This revision is now accepted and ready to land. Comment at: clang/docs/DataFlowSanitizer.rst:141 +For instrumented functions, the ABI list supports a ``force_zero_labels`` +category, which will make all shadow st

[PATCH] D105909: [clang][CallGraphSection] Add type id metadata to indirect call and targets

2021-07-22 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse accepted this revision. morehouse added inline comments. This revision is now accepted and ready to land. Comment at: llvm/test/Verifier/operand-bundles.ll:91 + %l = load i32, i32* %ptr + call void @g() [ "type"(metadata !"_ZTSFvE.generalized"), "type"(metadata !"_Z

[PATCH] D105909: [clang][CallGraphSection] Add type id metadata to indirect call and targets

2021-07-22 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse added inline comments. Comment at: llvm/include/llvm/IR/LLVMContext.h:97 OB_clang_arc_attachedcall = 6, // "clang.arc.attachedcall" +OB_type = 7, // "type" }; necipfazil wrote: > morehouse wrote: > > Do we need to update `L

[PATCH] D104058: ThinLTO: Fix inline assembly references to static functions with CFI

2021-07-20 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse added a comment. This patch broke the sanitizer-windows bot: https://lab.llvm.org/buildbot/#/builders/127/builds/14257 Failed Tests (4): cfi-devirt-lld-thinlto-x86_64 :: anon-namespace.cpp cfi-devirt-lld-thinlto-x86_64 :: simple-pass.cpp cfi-standalone-lld-thinlto-x86_64

[PATCH] D105909: [clang][CallGraphSection] Add type id metadata to indirect call and targets

2021-07-19 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse added inline comments. Comment at: clang/lib/CodeGen/CGCall.cpp:5255 + CST = QualType(TargetDecl->getFunctionType(), 0); +else if (auto FPT = Callee.getAbstractInfo().getCalleeFunctionProtoType()) + CST = QualType(FPT, 0); Please fix this

[PATCH] D105907: [CallGraphSection] Add call graph section options and documentation

2021-07-19 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse accepted this revision. morehouse added a comment. This revision is now accepted and ready to land. New .callgraph section layout LGTM. Please also address any further feedback from Fangrui. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D1

[PATCH] D105907: [CallGraphSection] Add call graph section options and documentation

2021-07-16 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse added inline comments. Comment at: clang/test/Driver/clang_f_opts.c:603 +// RUN: %clang -### -fno-call-graph-section %s 2>&1 | FileCheck -check-prefix=CHECK-NO-CALL-GRAPH-SECTION %s +// RUN: %clang -### %s 2>&1 | FileCheck -check-prefix=CHECK-NO-CALL-GRAPH-SECTION %s

[PATCH] D105909: [clang][CallGraphSection] Add type id metadata to indirect call and targets

2021-07-14 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse added a comment. Also, have you looked into operand bundles instead of metadata? I don't know much about them, but they might help with the optimizations-dropping-metadata problem. Repository: rG LLVM Github Monorepo CHANGES SINCE L

[PATCH] D105911: [CallGraphSection] Introduce CGSectionFuncComdatCreator pass

2021-07-14 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse added a subscriber: MaskRay. morehouse added a comment. Are comdats needed? Can we get proper dead stripping with just `SHF_LINK_ORDER`? @MaskRay recently updated the documentation for associated metadata to imply that our sym

[PATCH] D105909: [clang][CallGraphSection] Add type id metadata to indirect call and targets

2021-07-14 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse added inline comments. Comment at: clang/lib/CodeGen/CodeGenModule.cpp:2068 +EmittedMDIdGeneralized = true; + } + This code also seems unnecessary as it puts metadata on function definitions. Comment at: clang/lib/CodeGen/CodeGen

[PATCH] D105907: [CallGraphSection] Add call graph section options and documentation

2021-07-14 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse added a subscriber: MaskRay. morehouse added a comment. We should also tests for the new flags in clang/test/Driver/clang_f_opts.c. Comment at: clang/docs/CallGraphSection.rst:58 + +A type identifier may be repeated in different entries. The id value 0 is +reserved fo

[PATCH] D105909: [clang][CallGraphSection] Add type id metadata to indirect call and targets

2021-07-13 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse added a comment. I think we want a C++ test as well, with class functions, templates, etc. Also, please rebase the patch onto any parent commits, so that it builds properly and the clang-tidy warnings go away. Comment at: clang/lib/CodeGen/CGObjCMac.cpp:2288 +}

[PATCH] D105907: [CallGraphSection] Add call graph section options and documentation

2021-07-13 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse added inline comments. Comment at: clang/docs/CallGraphSection.rst:58 + +A type identifier may be repeated in different entries. The id value 0 is +reserved for unknown and used for indirect targets with unknown type. Why would a type ID be repeated?

[PATCH] D105378: [dfsan][NFC] Add Origin Tracking into doc

2021-07-07 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse accepted this revision. morehouse added a comment. This revision is now accepted and ready to land. We may also want to consider creating a frontend flag like MSan's origin tracking (`-fsanitize-memory-track-origins`). Comment at: clang/docs/DataFlowSanitizer.rst:214

[PATCH] D104279: [asan] Remove Asan, Ubsan support of RTEMS and Myriad

2021-06-15 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse accepted this revision. morehouse added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104279/new/ https://reviews.llvm.org/D104279 _

[PATCH] D102901: [HWASan] Add basic stack tagging support for LAM.

2021-06-11 Thread Matt Morehouse 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 rG0867edfc6438: [HWASan] Add basic stack tagging support for LAM. (authored by morehouse). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST A

[PATCH] D102901: [HWASan] Add basic stack tagging support for LAM.

2021-06-11 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse updated this revision to Diff 351459. morehouse added a comment. - Fix clang test failure on Windows. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102901/new/ https://reviews.llvm.org/D102901 Files: clang/lib/Driver/SanitizerArgs.cpp

[PATCH] D102901: [HWASan] Add basic stack tagging support for LAM.

2021-06-09 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse updated this revision to Diff 350989. morehouse marked 2 inline comments as done. morehouse added a comment. - - Address nits. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102901/new/ https://reviews.llvm.org/D102901 Files: clang/lib/

[PATCH] D102901: [HWASan] Add basic stack tagging support for LAM.

2021-06-09 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse updated this revision to Diff 350976. morehouse added a comment. - Privatize new member variables. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102901/new/ https://reviews.llvm.org/D102901 Files: clang/lib/Driver/SanitizerArgs.cpp c

[PATCH] D102901: [HWASan] Add basic stack tagging support for LAM.

2021-06-09 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse updated this revision to Diff 350975. morehouse marked 3 inline comments as done. morehouse added a comment. Herald added a project: clang. Herald added subscribers: Sanitizers, cfe-commits. - Rename flag as experimental. - Refactor and simplify code. - Apply mask to base tag only. - Ena

[PATCH] D102772: [SanitizeCoverage] Add support for NoSanitizeCoverage function attribute

2021-05-20 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse accepted this revision. morehouse added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102772/new/ https://reviews.llvm.org/D102772 _

[PATCH] D102286: [HWASan] Build separate LAM runtime on x86_64.

2021-05-17 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse added a comment. In D102286#2764203 , @gulfem wrote: > We started seeing test failures in our Windows builds in Fuchsia after this > patch. > > FAILED: > compiler-rt/lib/hwasan/CMakeFiles/RTHwasanAliases.aarch64.dir/hwasan_interceptors.cpp.o

[PATCH] D102286: [HWASan] Build separate LAM runtime on x86_64.

2021-05-17 Thread Matt Morehouse 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 rG5f58322368b0: [HWASan] Build separate LAM runtime on x86_64. (authored by morehouse). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTI

[PATCH] D102288: [HWASan] Add aliasing flag and enable HWASan to use it.

2021-05-14 Thread Matt Morehouse via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGb7d1ab75cf47: [HWASan] Add aliasing flag and enable HWASan to use it. (authored by morehouse). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102288/new/ htt

[PATCH] D102288: [HWASan] Add aliasing flag and enable HWASan to use it.

2021-05-13 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse updated this revision to Diff 345317. morehouse marked an inline comment as done. morehouse added a comment. - s/ENABLE_ALIASES/HWASAN_ENABLE_ALIASES Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102288/new/ https://reviews.llvm.org/D1022

[PATCH] D102288: [HWASan] Add aliasing flag and enable HWASan to use it.

2021-05-13 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse updated this revision to Diff 345295. morehouse marked an inline comment as done. morehouse added a comment. - Rename flag to -fsanitize-hwaddress-experimental-aliasing. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102288/new/ https://re

[PATCH] D102288: [HWASan] Add -fsanitize=lam flag and enable HWASan to use it.

2021-05-13 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse added inline comments. Comment at: clang/include/clang/Driver/Options.td:4172 +// on x86_64 and is subject to change in the future. For example, we may want +// to distinguish between LAM48 and LAM57 at some point. +def mlam : Flag<["-"], "mlam">, Group; --

[PATCH] D102288: [HWASan] Add -fsanitize=lam flag and enable HWASan to use it.

2021-05-13 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse updated this revision to Diff 345284. morehouse added a comment. - Remove diffbase. - Use -fexperimental-sanitize-hwaddress-aliasing instead of -mlam. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102288/new/ https://reviews.llvm.org/D102

[PATCH] D102286: [HWASan] Build separate LAM runtime on x86_64.

2021-05-13 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse updated this revision to Diff 345282. morehouse added a comment. Herald added a project: clang. Herald added a subscriber: cfe-commits. - Rebase onto D102288 . - Refactor to make LAM the default runtime. - Use alias runtime if specified. Repository:

[PATCH] D102288: [HWASan] Add -fsanitize=lam flag and enable HWASan to use it.

2021-05-13 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse updated this revision to Diff 345210. morehouse marked 4 inline comments as done. morehouse added a comment. Herald added a subscriber: dang. - Use -mlam option instead of -fsanitize=lam. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D10228

[PATCH] D102288: [HWASan] Add -fsanitize=lam flag and enable HWASan to use it.

2021-05-12 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse added inline comments. Comment at: clang/include/clang/Basic/Sanitizers.def:55-59 +// Utilize Intel LAM in sanitizers. Currently only used in combination with +// -fsanitize=hwaddress. This is an experimental flag which may be removed in +// the future. +// TODO: Use

[PATCH] D102288: [HWASan] Add -fsanitize=lam flag and enable HWASan to use it.

2021-05-11 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse created this revision. morehouse added reviewers: vitalybuka, eugenis. Herald added subscribers: dexonsmith, mgorny. morehouse requested review of this revision. Herald added projects: clang, Sanitizers. Herald added subscribers: Sanitizers, cfe-commits. -fsanitize=lam is intended to be

[PATCH] D100161: Redistribute energy for Corpus

2021-04-14 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse added a comment. At this point I am not convinced this patch will provide benefit for the default use case when `-entropic=1`. I am hesitant to add complexity to the code for unsure benefit. If you request a FuzzBench experiment

[PATCH] D100161: Redistribute energy for Corpus

2021-04-13 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse added a comment. If the effect is similar to entropic, why do we need this patch as well? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D100161/new/ https://reviews.llvm.org/D100161 ___ cfe-comm

[PATCH] D100161: Redistribute energy for Corpus

2021-04-12 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse added a comment. Also, the descriptions states: > Divide the corpus into n parts according to size. Is it really according to size? IIUC when there are multiple worker processes, any new coverage they have simply gets appended to `Files`. So `Files` is not necessarily sorted by siz

[PATCH] D100161: Redistribute energy for Corpus

2021-04-12 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse added a subscriber: metzman. morehouse added a comment. Thanks for sharing your data. Took a quick look and seems promising. I would like to try this on FuzzBench before accepting the patch though. FuzzBench has a very nice experimental framework for evaluating changes like this. >

[PATCH] D100161: Redistribute energy for Corpus

2021-04-09 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse added a comment. Thanks for the patch! Would you mind sharing the experimental data/results you obtained for this patch? Additionally, could you submit this patch to FuzzBench for an independent evaluation? Thanks, Matt Repository: rG LLVM G

[PATCH] D98892: [HWASan] Mention x86_64 aliasing mode in design doc.

2021-03-25 Thread Matt Morehouse 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 rG8e0bb21931db: [HWASan] Mention x86_64 aliasing mode in design doc. (authored by morehouse). Repository: rG LLVM Github Monorepo CHANGES SINCE LAS

[PATCH] D98892: [HWASan] Mention x86_64 aliasing mode in design doc.

2021-03-19 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse updated this revision to Diff 331895. morehouse marked an inline comment as done. morehouse added a comment. - Expand on lack of 32 bit support. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98892/new/ https://reviews.llvm.org/D98892 Fil

[PATCH] D98892: [HWASan] Mention x86_64 aliasing mode in design doc.

2021-03-18 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse updated this revision to Diff 331670. morehouse added a comment. - Format `fork()` as code. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98892/new/ https://reviews.llvm.org/D98892 Files: clang/docs/HardwareAssistedAddressSanitizerDesi

[PATCH] D98892: [HWASan] Mention x86_64 aliasing mode in design doc.

2021-03-18 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse created this revision. morehouse added reviewers: pcc, eugenis. morehouse requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D98892 Files: clang/docs/HardwareAssisted

[PATCH] D92728: [NFC][MSan] Round up OffsetPtr in PoisonMembersgetFieldOffset(layoutStartOffset) for current calleds is expected topoint to the first trivial field or the one which follows non-trivial

2020-12-07 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse added inline comments. Comment at: clang/lib/CodeGen/CGClass.cpp:1742 + Context.toCharUnitsFromBits(Layout.getFieldOffset(layoutStartOffset) + + Context.getCharWidth() - 1); + llvm::ConstantInt *OffsetSizePtr = ---

[PATCH] D92727: [CodeGen][MSan] Don't use offsets of zero-sized fields

2020-12-07 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse accepted this revision. morehouse added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D92727/new/ https://reviews.llvm.org/D92727 ___

[PATCH] D87921: Fix -funique-internal-linkage-names to work with -O2 and new pass manager

2020-09-22 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse added a comment. The revert did not fix the PPC bots. I suspect there is some kind of resource issue from the logs: msgget:: No space left on device sysmsg.c.tmp: /home/buildbots/ppc64le-clang-lnt-test/clang-ppc64le-lnt/llvm/compiler-rt/test/sanitizer_common/TestCases/Linux/sysms

[PATCH] D87921: Fix -funique-internal-linkage-names to work with -O2 and new pass manager

2020-09-22 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse added a comment. Thanks for looking. Indeed, it looks like an issue with the disk being full on the bot. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87921/new/ https://reviews.llvm.org/D87921 _

[PATCH] D87921: Fix -funique-internal-linkage-names to work with -O2 and new pass manager

2020-09-21 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse added a comment. This change appears to trigger an assertion failure in sysmsg.c on the PPC bot: http://lab.llvm.org:8011/builders/clang-ppc64le-linux-lnt/builds/26845/steps/ninja%20check% TEST 'SanitizerCommon-msan-powerpc64le-Linux :: Linux/sysmsg.c' FAILED

[PATCH] D84371: [DFSan] Add efficient fast16labels instrumentation mode.

2020-08-14 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse added inline comments. Comment at: compiler-rt/lib/dfsan/dfsan.cpp:180 dfsan_label __dfsan_union(dfsan_label l1, dfsan_label l2) { - if (flags().fast16labels) + if (fast16labels) return l1 | l2; morehouse wrote: > morehouse wrote: > > vitalybuka

[PATCH] D84371: [DFSan] Add efficient fast16labels instrumentation mode.

2020-08-14 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse added inline comments. Comment at: compiler-rt/lib/dfsan/dfsan.cpp:180 dfsan_label __dfsan_union(dfsan_label l1, dfsan_label l2) { - if (flags().fast16labels) + if (fast16labels) return l1 | l2; morehouse wrote: > vitalybuka wrote: > > morehouse

[PATCH] D84371: [DFSan] Add efficient fast16labels instrumentation mode.

2020-07-29 Thread Matt Morehouse 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 rGe2d0b44a7cd2: [DFSan] Add efficient fast16labels instrumentation mode. (authored by morehouse). Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D84371: [DFSan] Add efficient fast16labels instrumentation mode.

2020-07-29 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse added inline comments. Comment at: compiler-rt/lib/dfsan/dfsan.cpp:180 dfsan_label __dfsan_union(dfsan_label l1, dfsan_label l2) { - if (flags().fast16labels) + if (fast16labels) return l1 | l2; vitalybuka wrote: > morehouse wrote: > > vitalybuk

[PATCH] D84371: [DFSan] Add efficient fast16labels instrumentation mode.

2020-07-29 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse updated this revision to Diff 281687. morehouse marked 2 inline comments as done. morehouse added a comment. - Remove preinit stuff and API warnings; use custom union-load callback. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84371/new/

[PATCH] D84707: [DFSan][NewPM] Port DataFlowSanitizer to NewPM

2020-07-29 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse accepted this revision. morehouse added a comment. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84707/new/ https://reviews.llvm.org/D84707 ___ cfe-commits mailing list cfe-commits@lists.l

[PATCH] D84707: [DFSan][NewPM] Port DataFlowSanitizer to NewPM

2020-07-29 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse added inline comments. Comment at: llvm/lib/Passes/PassRegistry.def:92 MODULE_PASS("verify", VerifierPass()) +MODULE_PASS("dfsan", DataFlowSanitizerPass()) MODULE_PASS("asan-module", ModuleAddressSanitizerPass(/*CompileKernel=*/false, false, true, false)) ---

[PATCH] D83987: Recommit "[libFuzzer] Disable implicit builtin knowledge about memcmp-like functions when -fsanitize=fuzzer-no-link is given."

2020-07-27 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse accepted this revision. morehouse added a comment. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D83987/new/ https://reviews.llvm.org/D83987 ___ cfe-commits mailing list cfe-commits@lists

[PATCH] D84371: [DFSan] Add efficient fast16labels instrumentation mode.

2020-07-24 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse updated this revision to Diff 280485. morehouse marked 5 inline comments as done. morehouse added a comment. - Rename flag - Clarify doc example - Use temporary variables. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84371/new/ https://r

[PATCH] D84371: [DFSan] Add efficient fast16labels instrumentation mode.

2020-07-24 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse added inline comments. Comment at: compiler-rt/lib/dfsan/dfsan.cpp:180 dfsan_label __dfsan_union(dfsan_label l1, dfsan_label l2) { - if (flags().fast16labels) + if (fast16labels) return l1 | l2; vitalybuka wrote: > isn't better just create new s

[PATCH] D84371: [DFSan] Add efficient fast16labels instrumentation mode.

2020-07-23 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse updated this revision to Diff 280304. morehouse added a comment. - Fix libfuzzer dataflow tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84371/new/ https://reviews.llvm.org/D84371 Files: clang/docs/DataFlowSanitizer.rst compile

[PATCH] D84371: [DFSan] Add efficient fast16labels instrumentation mode.

2020-07-23 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse added a subscriber: Dor1s. morehouse added a comment. In D84371#2168367 , @kcc wrote: > In what cases do we still call __dfsan_union? We still call `__dfsan_union_load` when we load sizes greater than 2 bytes but not divisible by 4. I actuall

[PATCH] D84371: [DFSan] Add efficient fast16labels instrumentation mode.

2020-07-23 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse updated this revision to Diff 280286. morehouse marked 6 inline comments as done. morehouse added a comment. Herald added a project: clang. Herald added a subscriber: cfe-commits. - Add documentation. - Remove fast16labels runtime flag. Repository: rG LLVM Github Monorepo CHANGES SI

[PATCH] D83494: [libFuzzer] Link libFuzzer's own interceptors when other compiler runtimes are not linked.

2020-07-22 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse accepted this revision. morehouse added a comment. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D83494/new/ https://reviews.llvm.org/D83494 ___ cfe-commits mailing list cfe-commits@lists

[PATCH] D83494: [libFuzzer] Link libFuzzer's own interceptors when other compiler runtimes are not linked.

2020-07-22 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse added inline comments. Comment at: compiler-rt/lib/fuzzer/FuzzerInterceptors.cpp:86 +s2++; + } + return 0; Lot's of common code with `internal_strncmp`. Let's factor it out into a helper function. Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D83494: [libFuzzer] Link libFuzzer's own interceptors when other compiler runtimes are not linked.

2020-07-20 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse added inline comments. Comment at: compiler-rt/test/fuzzer/custom-allocator.test:2 +UNSUPPORTED: freebsd +RUN: %cpp_compiler -fno-sanitize=all -fno-builtin %S/CustomAllocator.cpp -fPIC %ld_flags_rpath_so1 -O0 -shared -o %dynamiclib1 +RUN: %cpp_compiler -fno-sanitize=ad

[PATCH] D83494: [libFuzzer] Link libFuzzer's own interceptors when other compiler runtimes are not linked.

2020-07-17 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse added inline comments. Comment at: compiler-rt/lib/fuzzer/FuzzerInterceptors.cpp:62 + +static int internal_strncmp(const char *s1, const char *s2, uintptr_t n) { + for (uintptr_t i = 0; i < n; i++) { Can we use `size_t` instead of `uintptr_t`? ==

[PATCH] D83987: [libFuzzer] Disable implicit builtin knowledge about memcmp-like functions when -fsanitize=fuzzer-no-link is given.

2020-07-16 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse accepted this revision. morehouse added a comment. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D83987/new/ https://reviews.llvm.org/D83987 ___ cfe-commits mailing list cfe-commits@lists

[PATCH] D83494: [libFuzzer] Link libFuzzer's own interceptors when other compiler runtimes are not linked.

2020-07-16 Thread Matt Morehouse via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGf78d9fceea73: [libFuzzer] Link libFuzzer's own interceptors when other compiler runtimes are… (authored by dokyungs, committed by morehouse). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACT

[PATCH] D83494: [libFuzzer] Link libFuzzer's own interceptors when other compiler runtimes are not linked.

2020-07-16 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse added inline comments. Comment at: compiler-rt/lib/fuzzer/FuzzerInterceptors.cpp:51 +static int fuzzerInited = 0; +static bool fuzzerInitIsRunning; + Sorry, one last nit: If we're preferring LLVM style, let's [capitalize](https://llvm.org/docs/CodingS

[PATCH] D83494: [libFuzzer] Link libFuzzer's own interceptors when other compiler runtimes are not linked.

2020-07-16 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse added inline comments. Comment at: compiler-rt/lib/fuzzer/FuzzerInterceptors.cpp:17 + +#define GET_CALLER_PC() __builtin_return_address(0) + Nit: Let's move this down with the other defines. Comment at: compiler-rt/lib/fuzzer/FuzzerIn

[PATCH] D83494: [libFuzzer] Link libFuzzer's own interceptors when other compiler runtimes are not linked.

2020-07-16 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse added inline comments. Comment at: compiler-rt/lib/fuzzer/FuzzerInterceptors.cpp:53 +int fuzzer_inited = 0; +bool fuzzer_init_is_running; + These are in the global namespace, and have C mangling, which is unnecessary. Please either put them in a names

[PATCH] D83494: [libFuzzer] Link libFuzzer's own interceptors when other compiler runtimes are not linked.

2020-07-15 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse added a comment. I applied this patch locally and ran the fuzzer tests. I get a segfault: $ clang++ -fsanitize=fuzzer -g -m32 SimpleHashTest.cpp $ gdb --args ./a.out -seed=1 ... (gdb) run ... Program received signal SIGSEGV, Segmentation fault. 0x in ?? () (gdb

[PATCH] D83494: [libFuzzer] Link libFuzzer's own interceptors when other compiler runtimes are not linked.

2020-07-14 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse accepted this revision. morehouse added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D83494/new/ https://reviews.llvm.org/D83494 _

[PATCH] D83494: [libFuzzer] Link libFuzzer's own interceptors when other compiler runtimes are not linked.

2020-07-14 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse added a comment. In D83494#2150946 , @dokyungs wrote: > I was misled; the error is actually ambiguating new "declarations", not > definitions. The exact error message goes like: > > error: ambiguating new declaration of ‘char* strcasestr(const

[PATCH] D83494: [libFuzzer] Link libFuzzer's own interceptors when other compiler runtimes are not linked.

2020-07-14 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse added a comment. In D83494#2148868 , @dokyungs wrote: > Addressed Matt's comments. > > A major change in this round that needs explanation is introduction of > FuzzerPlatform.h. Previously I defined `strstr` and `strcasestr` with `extern > "C++

[PATCH] D83494: [libFuzzer] Link libFuzzer's own interceptors when other compiler runtimes are not linked.

2020-07-13 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse added inline comments. Comment at: compiler-rt/lib/fuzzer/FuzzerInterceptors.cpp:14 + +#if LIBFUZZER_LINUX + We should include FuzzerDefs.h to use this, not FuzzerBuiltins.h. Comment at: compiler-rt/lib/fuzzer/FuzzerInterceptors.cpp:2

[PATCH] D83494: [libFuzzer] Link libFuzzer's own interceptors when other compiler runtimes are not linked.

2020-07-13 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse added a comment. In D83494#2148164 , @dokyungs wrote: > In D83494#2148043 , @hctim wrote: > > > In D83494#2147608 , @dokyungs > > wrote: > > > > > Builtin libfunc

[PATCH] D83494: [libFuzzer] Link libFuzzer's own interceptors when other compiler runtimes are not linked.

2020-07-09 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse added a comment. Seems like the general approach we want. Could you: - Fix the lint warnings - Find out why the unit tests failed - Add strcmp - Modify the memcmp/strcmp unit tests to show that we can solve them with/without ASan After that I'll take a closer look. Repository: rG

[PATCH] D82926: [libfuzzer] [clang] Add __has_feature(fuzzing_coverage)

2020-07-01 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse added a comment. In D82926#2125950 , @hctim wrote: > So - the `FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION` flag is a property of the > build system and not that of the compiler. There are some places (android) > where enabling `FUZZING_BUILD_MODE

[PATCH] D82926: [libfuzzer] [clang] Add __has_feature(fuzzing_coverage)

2020-06-30 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse added a comment. Can we just use `FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION` instead? I'm a little wary of introducing a new way to do conditional compilation since fuzzers that don't use sancov can't rely on it. Repo

[PATCH] D78390: [dfsan] Add "DataFlow" option to LLVM_USE_SANITIZER

2020-04-17 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse accepted this revision. morehouse added inline comments. Comment at: clang/docs/DataFlowSanitizer.rst:23 +How to build + Nit: "How to build libc++" Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.

[PATCH] D78390: [dfsan] Add "DataFlow" option to LLVM_USE_SANITIZER

2020-04-17 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse added inline comments. Comment at: clang/docs/DataFlowSanitizer.rst:24 +How to build + + Let's add some explanation here about why we want to build libc++ with dfsan. Comment at: clang/docs/DataFlowSanitizer.rst:26 + +Buil

[PATCH] D69171: [clang-fuzzer] Add new fuzzer target for Objective-C

2020-04-13 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse added inline comments. Comment at: clang/tools/clang-fuzzer/ClangObjectiveCFuzzer.cpp:19 -extern "C" int LLVMFuzzerInitialize(int *argc, char ***argv) { return 0; } - RKSimon wrote: > @dgoldman @morehouse Removing this has been causing link failures e

[PATCH] D63616: Implement `-fsanitize-coverage-whitelist` and `-fsanitize-coverage-blacklist` for clang

2020-04-10 Thread Matt Morehouse via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGbef187c75090: Implement `-fsanitize-coverage-whitelist` and `-fsanitize-coverage-blacklist`… (authored by morehouse). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llv

[PATCH] D63616: Implement `-fsanitize-coverage-whitelist` and `-fsanitize-coverage-blacklist` for clang

2020-04-10 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse accepted this revision. morehouse added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63616/new/ https://reviews.llvm.org/D63616 _

[PATCH] D63616: Implement `-fsanitize-coverage-whitelist` and `-fsanitize-coverage-blacklist` for clang

2020-04-09 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse requested changes to this revision. morehouse added a comment. This revision now requires changes to proceed. In D63616#1961449 , @tuktuk wrote: > Am I missing an additional step for test integration, after adding the test > file? Just tried l

[PATCH] D63616: Implement `-fsanitize-coverage-whitelist` and `-fsanitize-coverage-blacklist` for clang

2020-04-09 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse accepted this revision. morehouse added a comment. Thanks again for the patch. Sorry about the delay in landing it; I'll work on it today. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63616/new/ https://reviews.llvm.org/D63616 _

[PATCH] D69171: [clang-fuzzer] Add new fuzzer target for Objective-C

2019-10-21 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse accepted this revision. morehouse added a comment. This revision is now accepted and ready to land. LGTM Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69171/new/ https://reviews.llvm.org/D69171 ___ cfe-comm

[PATCH] D69171: [clang-fuzzer] Add new fuzzer target for Objective-C

2019-10-18 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse added inline comments. Comment at: tools/clang-fuzzer/ClangObjectiveCFuzzer.cpp:19 + +extern "C" int LLVMFuzzerInitialize(int *argc, char ***argv) { return 0; } + Nit: Since it does nothing, let's omit the `LLVMFuzzerInitialize` definition. =

  1   2   3   >