[PATCH] D85576: [clang][Fuchsia] Add relative-vtables multilib

2020-10-19 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 299138. leonardchan edited the summary of this revision. leonardchan added a comment. Updated to use the `-fexperimental-relative-c++-ab-vtables` flag now that D85802 was reverted. This will be used for the purpose of te

[PATCH] D83812: [clang][RelativeVTablesABI] Use dso_local_equivalent rather than emitting stubs

2020-10-23 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 300410. leonardchan retitled this revision from "[clang][RelativeVTablesABI] Do not emit stubs for architectures that support a PLT relocation" to "[clang][RelativeVTablesABI] Use dso_local_equivalent rather than emitting stubs". leonardchan edited the s

[PATCH] D90275: [clang][IR] Add support for leaf attribute

2020-10-27 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. I'd recommend splitting this into two patches, one for LLVM changes and another for Clang changes. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D90275/new/ https://reviews.llvm.org/D90275 _

[PATCH] D83812: [clang][RelativeVTablesABI] Use dso_local_equivalent rather than emitting stubs

2020-11-02 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 302427. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D83812/new/ https://reviews.llvm.org/D83812 Files: clang/lib/CodeGen/CGVTables.cpp clang/test/CodeGenCXX/RelativeVTablesABI/child-inheritted-from-par

[PATCH] D102374: [clang][Fuchsia] Turn on relative-vtables by default for Fuchsia

2021-05-12 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan created this revision. leonardchan added a project: clang. Herald added subscribers: dang, phosek. leonardchan requested review of this revision. All fuchsia targets will now use the relative-vtables ABI by default. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D102

[PATCH] D102374: [clang][Fuchsia] Turn on relative-vtables by default for Fuchsia

2021-05-13 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added inline comments. Comment at: clang/lib/Frontend/CompilerInvocation.cpp:3293 +static bool SupportsRelativeCXXVTables(const llvm::Triple &T) { + return T.isOSFuchsia(); +} phosek wrote: > Could we instead enable it inside `FuchsiaCXXABI`? So we c

[PATCH] D102374: [clang][Fuchsia] Turn on relative-vtables by default for Fuchsia

2021-05-13 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 345293. leonardchan added a comment. Change the tablegen definition of `-f[no-]experimental-relative-c++-abi-vtables` from a BoolFOption to two separate flags so we can control the default value of the `RelativeCXXABIVTables` LangOption more explicitly

[PATCH] D102374: [clang][Fuchsia] Turn on relative-vtables by default for Fuchsia

2021-05-13 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. Ready for reviews. Let me know if I should add other reviewers for the flag/option processing. This shouldn't impact how the experimental flag is used. It's just processing it that's different. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION http

[PATCH] D102374: [clang][Fuchsia] Turn on relative-vtables by default for Fuchsia

2021-05-14 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 345484. leonardchan marked an inline comment as done. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102374/new/ https://reviews.llvm.org/D102374 Files: clang/include/clang/Basic/TargetCXXABI.h clang/incl

[PATCH] D91466: [WIP][clang][Fuchsia] Support HWASan for Fuchsia

2021-05-17 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 345931. leonardchan added a comment. Update to some feedback from first round of reviews. Minor refactoring of code that can be shared between the linux and fuchsia implementations. Still need to discuss refactoring the hwasan threads implementation. R

[PATCH] D96418: [clang] Refactor mustprogress handling, add it to all loops in c++11+.

2021-05-25 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. Hi all, it looks like this commit led to some unexpected behavior in our build. When compiling something like: // clang++ -c -S -o - /tmp/test.cc -std=c++17 -O1 static int do_nothing(void* unused) { for (;;) { } return 0; } typedef int (*func_t

[PATCH] D96418: [clang] Refactor mustprogress handling, add it to all loops in c++11+.

2021-05-26 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. > Well, no, I'm afraid it is actually clear that that code does have UB > according to the C++ standard. Perhaps you mean that it *shouldn't* have UB, > or that Clang should define its behavior despite the standard. > > I might agree with you that I don't see the va

[PATCH] D103477: [Fuchsia] Add compat multilibs to cache file

2021-06-01 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan created this revision. leonardchan added reviewers: phosek, mcgrathr. leonardchan added a project: clang. Herald added a subscriber: mgorny. leonardchan requested review of this revision. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D103477 Files: clang/cmake/cach

[PATCH] D103477: [Fuchsia] Add compat multilibs to cache file

2021-06-01 Thread Leonard Chan via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGda1db4940965: [Fuchsia] Add compat multilibs to cache file (authored by leonardchan). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103477/new/ https://revi

[PATCH] D102374: [clang][Fuchsia] Turn on relative-vtables by default for Fuchsia

2021-06-01 Thread Leonard Chan 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 rGe6f88dc01a72: [clang][Fuchsia] Turn on relative-vtables by default for Fuchsia (authored by leonardchan). Repository: rG LLVM Github Monorepo CHA

[PATCH] D103543: [compiler-rt][Fuchsia] Support HWASan on Fuchsia

2021-06-02 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan created this revision. leonardchan added reviewers: phosek, mcgrathr, charco. leonardchan added a project: Sanitizers. Herald added subscribers: mgorny, dberris. leonardchan requested review of this revision. Herald added a subscriber: Sanitizers. This allows for hwasan to be built tar

[PATCH] D103544: [compiler-rt][Fuchsia] Disable interceptors while enabling new/delete replacements

2021-06-02 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan created this revision. leonardchan added reviewers: phosek, mcgrathr, charco. leonardchan added a project: Sanitizers. Herald added subscribers: mgorny, dberris. leonardchan requested review of this revision. Herald added a subscriber: Sanitizers. This disables use of hwasan intercepto

[PATCH] D103562: [NFC][compiler-rt][hwasan] Refactor hwasan functions

2021-06-02 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan created this revision. leonardchan added reviewers: mcgrathr, phosek, eugenis, vitalybuka. leonardchan added a project: Sanitizers. Herald added a subscriber: dberris. leonardchan requested review of this revision. Herald added a subscriber: Sanitizers. This moves the implementations f

[PATCH] D103544: [compiler-rt][Fuchsia] Disable interceptors while enabling new/delete replacements

2021-06-02 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 349399. leonardchan marked 2 inline comments as done. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103544/new/ https://reviews.llvm.org/D103544 Files: compiler-rt/CMakeLists.txt compiler-rt/lib/hwasan/C

[PATCH] D103564: [NFC][compiler-rt][hwasan] Wrap vfork interceptor with HWASAN_WITH_INTERCEPTORS

2021-06-02 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan created this revision. leonardchan added reviewers: phosek, mcgrathr, eugenis, vitalybuka. leonardchan added a project: Sanitizers. Herald added a subscriber: dberris. leonardchan requested review of this revision. Herald added a subscriber: Sanitizers. This prevents emitting the vfork

[PATCH] D103562: [NFC][compiler-rt][hwasan] Refactor hwasan functions

2021-06-02 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 349404. leonardchan edited the summary of this revision. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103562/new/ https://reviews.llvm.org/D103562 Files: compiler-rt/lib/hwasan/hwasan.cpp compiler-rt/li

[PATCH] D95154: [WIP][clang][Fuchsia] Add the *-fuchsia-gnu arch and multilibs

2021-01-21 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan created this revision. leonardchan added reviewers: phosek, mcgrathr. leonardchan added a project: clang. Herald added subscribers: s.egerton, simoncook, mgorny. leonardchan requested review of this revision. Create libraries that are GCC compaitble. Repository: rG LLVM Github Mono

[PATCH] D95182: [clang][Fuchsia] Turn on Relative VTables for Fuchsia

2021-01-21 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan created this revision. leonardchan added reviewers: phosek, mcgrathr. leonardchan added a project: clang. Herald added a reviewer: jansvoboda11. leonardchan requested review of this revision. And also remove `-fexperimental-relative-c++-abi-vtables` from tests that already have fuchsi

[PATCH] D94355: [SimplifyCFG] Add relative switch lookup tables

2021-01-22 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. Almost there! Just a few more comments on my end. Comment at: llvm/lib/Transforms/Utils/SimplifyCFG.cpp:5694 +Constant *CaseRes = Values[I].second; +if (auto *GlobalVal = dyn_cast(CaseRes)) + if (!GlobalVal->isDSOLocal()) --

[PATCH] D95253: [clang][Fuchsia] Add relative-vtables + asan multilibs

2021-01-22 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan created this revision. leonardchan added reviewers: phosek, mcgrathr. leonardchan added a project: clang. Herald added a subscriber: mgorny. leonardchan requested review of this revision. We're choosing to take an opt-in approach for landing Relative VTables, so we'll need asan-equiva

[PATCH] D95253: [clang][Fuchsia] Add relative-vtables + asan multilibs

2021-01-25 Thread Leonard Chan via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGc0e94e997473: [clang][Fuchsia] Add relative-vtables + asan multilibs (authored by leonardchan). Changed prior to commit: https://reviews.llvm.org/D95253?vs=318588&id=319142#toc Repository: rG LLVM Gi

[PATCH] D93839: [clang-format] PR48594 BraceWrapping: SplitEmptyRecord ignored for templates

2021-01-26 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. Hi. Up until this point, we've noticed that this patch can produce different formatted files depending on amount of whitespace. For example, given (A): #include namespace fuzzing {} `clang-format` with this patch would produced (B): #include namespace fuz

[PATCH] D93839: [clang-format] PR48594 BraceWrapping: SplitEmptyRecord ignored for templates

2021-01-26 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. In D93839#2523703 , @curdeius wrote: > That's definitely an unintended behaviour. Please file a bug and possibly > mark it as release blocker for LLVM 12. Either a fix will be there soon, or > we'll revert. > > FYI, simple re

[PATCH] D95479: [clang-format] Avoid considering include directive as a template closer.

2021-01-26 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan accepted this revision. leonardchan added a comment. This revision is now accepted and ready to land. LGTM. Confirmed on our end this fixes our issue. Thanks for addressing this! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95479/new/

[PATCH] D95694: [clang][RelativeVTablesABI] Place non-local vtables in comdat groups

2021-01-29 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan created this revision. leonardchan added reviewers: mcgrathr, phosek. leonardchan added a project: clang. Herald added a subscriber: pengfei. leonardchan requested review of this revision. Currently, it's possible for vtables that fit precisely in a mergable constants group to not be

[PATCH] D109625: [compiler-rt] Ensure LIT_TEST_DEP targets are actually built

2021-09-16 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. *ping* Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D109625/new/ https://reviews.llvm.org/D109625 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.o

[PATCH] D109625: [compiler-rt] Ensure required deps for tests targets are actually built

2021-09-22 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 374393. leonardchan retitled this revision from "[compiler-rt] Ensure LIT_TEST_DEP targets are actually built" to "[compiler-rt] Ensure required deps for tests targets are actually built". Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D109625: [compiler-rt] Ensure required deps for tests targets are actually built

2021-09-22 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added inline comments. Comment at: compiler-rt/test/CMakeLists.txt:48 + if (NOT TARGET ${dep}) +llvm_ExternalProject_BuildCmd(build_${dep} ${dep} ${BINARY_DIR}) +add_custom_target(${dep} phosek wrote: > This is going to run Ninja

[PATCH] D109625: [compiler-rt] Ensure required deps for tests targets are actually built

2021-09-22 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 374396. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D109625/new/ https://reviews.llvm.org/D109625 Files: compiler-rt/test/CMakeLists.txt Index: compiler-rt/test/CMakeLists.txt ==

[PATCH] D109625: [compiler-rt] Ensure required deps for tests targets are actually built

2021-09-22 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added inline comments. Comment at: compiler-rt/test/CMakeLists.txt:48 + if (NOT TARGET ${dep}) +llvm_ExternalProject_BuildCmd(build_${dep} ${dep} ${BINARY_DIR}) +add_custom_target(${dep} leonardchan wrote: > phosek wrote: > > This

[PATCH] D109625: [compiler-rt] Ensure required deps for tests targets are actually built

2021-09-24 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 374984. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D109625/new/ https://reviews.llvm.org/D109625 Files: compiler-rt/cmake/Modules/AddCompilerRT.cmake compiler-rt/test/CMakeLists.txt Index: compiler-r

[PATCH] D109625: [compiler-rt] Ensure required deps for tests targets are actually built

2021-09-24 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. Updated to exclude readelf. We also don't need any of the other tools added in the `NOT COMPILER_RT_STANDALONE_BUILD` case, so I just added them to `LIT_ONLY_TOOLS` in the `COMPILER_RT_STANDALONE_BUILD` case. Repository: rG LLVM Github Monorepo CHANGES SINCE LAS

[PATCH] D109625: [compiler-rt] Ensure required deps for tests targets are actually built

2021-09-28 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 375713. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D109625/new/ https://reviews.llvm.org/D109625 Files: compiler-rt/test/CMakeLists.txt Index: compiler-rt/test/CMakeLists.txt ==

[PATCH] D109625: [compiler-rt] Ensure required deps for tests targets are actually built

2021-09-29 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. In D109625#3029581 , @phosek wrote: > I'm still unsure if this is the right strategy because it creates a > dependency cycle. Specifically, you have the LLVM build trigger the build of > runtimes, and that build would invoke

[PATCH] D109625: [compiler-rt] Ensure required deps for tests targets are actually built

2021-09-29 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 376042. leonardchan edited the summary of this revision. Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D109625/new/ https://reviews.llvm.o

[PATCH] D109625: [compiler-rt] Ensure required deps for tests targets are actually built

2021-09-29 Thread Leonard Chan 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 rG79b422080612: [runtimes] Ensure required deps for tests targets are actually built (authored by leonardchan). Repository: rG LLVM Github Monorepo

[PATCH] D110778: [clang][Fuchsia] Re-enable compiler-rt tests in runtimes build

2021-09-29 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan created this revision. leonardchan added a reviewer: phosek. Herald added subscribers: mgorny, dberris. leonardchan 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/

[PATCH] D110889: [clang][Fuchsia] Add -DSCUDO_DISABLE_TBI to test flags

2021-09-30 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan created this revision. leonardchan added a reviewer: phosek. Herald added subscribers: cryptoad, kristof.beyls, mgorny. leonardchan requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. After D110888

[PATCH] D110889: [clang][Fuchsia] Add -DSCUDO_DISABLE_TBI to test flags

2021-10-04 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan abandoned this revision. leonardchan added a comment. Herald added a subscriber: abrachet. In D110889#3035597 , @phosek wrote: > Is this needed even with D110888 ? Nope, at least after the updated patch this

[PATCH] D109625: [compiler-rt] Ensure required deps for tests targets are actually built

2021-10-04 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. Hmm. Just found out about this, but for future reference, I think this will only work for `ninja check-runtimes` and `ninja check-runtimes-{target}`, but not necessarily `ninja -C runtimes/runtimes-{target} check-runtimes/check-compilter-rt`. Repository: rG LLVM

[PATCH] D110778: [clang][Fuchsia] Re-enable compiler-rt tests in runtimes build

2021-10-04 Thread Leonard Chan 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 rG8480063f25b8: [clang][Fuchsia] Re-enable compiler-rt tests in runtimes build (authored by leonardchan). Herald added a subscriber: abrachet. Reposit

[PATCH] D94355: [Passes] Add relative lookup table generator pass

2021-02-18 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. It looks like you have everything setup for running on the new PM, but it doesn't look like the pass is added anywhere in the new PM pipeline. Unfortunately, I don't *think* there's anything in the new PM that acts as a "default pipeline that gets added to all other

[PATCH] D103562: [NFC][compiler-rt][hwasan] Refactor hwasan functions

2021-06-03 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 349689. leonardchan marked 2 inline comments as done. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103562/new/ https://reviews.llvm.org/D103562 Files: compiler-rt/lib/hwasan/hwasan.cpp compiler-rt/lib/h

[PATCH] D103562: [NFC][compiler-rt][hwasan] Refactor hwasan functions

2021-06-03 Thread Leonard Chan 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 rGd4e478b8: [NFC][compiler-rt][hwasan] Refactor hwasan functions (authored by leonardchan). Repository: rG LLVM Github Monorepo CHANGES SINCE L

[PATCH] D99364: [clang][cache] Update Fuchsia-stage2.cmake to create hwasan multilibs

2021-06-03 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 349700. leonardchan added a comment. Update to remove instrumentation on globals. It's likel we may not need the `hwasan+relative-vtables` multilibs when the next clang roll comes around. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D103564: [NFC][compiler-rt][hwasan] Wrap vfork interceptor with HWASAN_WITH_INTERCEPTORS

2021-06-03 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 349712. leonardchan added a comment. In D103564#2795287 , @mcgrathr wrote: > I think probably the better refactoring here would be to split this file in > two: one containing just the allocation functions; and a

[PATCH] D103841: [compiler-rt][hwasan] Decouple use of the TLS global for getting the shadow base and using the frame record feature

2021-06-07 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan created this revision. leonardchan added reviewers: phosek, mcgrathr, eugenis, vitalybuka. leonardchan added a project: Sanitizers. Herald added subscribers: hiraditya, dberris. leonardchan requested review of this revision. Herald added a project: LLVM. Herald added a subscriber: llvm-

[PATCH] D103845: [compiler-rt][hwasan] Add newline between record_addr lines on frame record dumps

2021-06-07 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan created this revision. leonardchan added reviewers: eugenis, vitalybuka. leonardchan added a project: Sanitizers. Herald added a subscriber: dberris. leonardchan requested review of this revision. Herald added a subscriber: Sanitizers. This is mostly a stylistic preference. Currently a

[PATCH] D103564: [NFC][compiler-rt][hwasan] Move allocation functions into their own file

2021-06-07 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 350437. leonardchan retitled this revision from "[NFC][compiler-rt][hwasan] Wrap fork interceptor with HWASAN_WITH_INTERCEPTORS" to "[NFC][compiler-rt][hwasan] Move allocation functions into their own file". leonardchan edited the summary of this revision

[PATCH] D103919: [CMake][Fuchsia] Use PIC for Fuchsia runtimes

2021-06-08 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan accepted this revision. leonardchan added a comment. This revision is now accepted and ready to land. Should `_LLVM_ENABLE_PIC ON` also be added for the multilibs? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103919/new/ https://review

[PATCH] D103845: [compiler-rt][hwasan] Add newline between record_addr lines on frame record dumps

2021-06-08 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. In D103845#2804441 , @pcc wrote: > This isn't how the output looks on Android. Are you sure this isn't a > Fuchsia-specific bug in the output formatting? I think the newline gets added to the frame description only if `Symb

[PATCH] D103564: [NFC][compiler-rt][hwasan] Move allocation functions into their own file

2021-06-08 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 350682. leonardchan marked 2 inline comments as done. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103564/new/ https://reviews.llvm.org/D103564 Files: compiler-rt/lib/hwasan/CMakeLists.txt compiler-rt/l

[PATCH] D103564: [NFC][compiler-rt][hwasan] Move allocation functions into their own file

2021-06-08 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added inline comments. Comment at: compiler-rt/lib/hwasan/hwasan_interceptors.cpp:171 } // namespace __hwasan +#else // #if !SANITIZER_FUCHSIA +namespace __hwasan { vitalybuka wrote: > mcgrathr wrote: > > blank lines around `#else` and `#endif` lin

[PATCH] D103564: [NFC][compiler-rt][hwasan] Move allocation functions into their own file

2021-06-08 Thread Leonard Chan 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 rG944b3c53aec5: [NFC][compiler-rt][hwasan] Move allocation functions into their own file (authored by leonardchan). Repository: rG LLVM Github Monor

[PATCH] D103564: [NFC][compiler-rt][hwasan] Move allocation functions into their own file

2021-06-08 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. In D103564#2806292 , @thakis wrote: > this breaks tests: http://45.33.8.238/linux/48401/step_10.txt > > ` // CHECK: #0 {{.*}} in {{.*}}free{{.*}} {{.*}}hwasan_interceptors.cpp` > > vs > > ` 13: #0 0x5647a467e9a0 in

[PATCH] D103845: [compiler-rt][hwasan] Add newline between record_addr lines on frame record dumps

2021-06-08 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. Oh, actually @pcc was right on closer inspection. This is a misunderstanding on my end. So the `{{bt:...}}}` comes from constexpr const char *kFormatFrame = "{{{bt:%u:%p}}}"; defined in `sanitizer_symbolizer_fuchsia.h` and this is only used in the definition for

[PATCH] D103936: [compiler-rt][hwasan] Define fuchsia implementations of required hwasan functions

2021-06-08 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan created this revision. leonardchan added reviewers: phosek, mcgrathr, charco. leonardchan added a project: Sanitizers. Herald added subscribers: jfb, mgorny, dberris. leonardchan requested review of this revision. Herald added a subscriber: Sanitizers. This contains all the definitions

[PATCH] D103936: [compiler-rt][hwasan] Define fuchsia implementations of required hwasan functions

2021-06-08 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. Let me know if these functions should be split up or can land together. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103936/new/ https://reviews.llvm.org/D103936 ___ cfe-com

[PATCH] D104085: [compiler-rt][hwasan] Setup hwasan thread handling on Fuchsia

2021-06-10 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan created this revision. leonardchan added reviewers: phosek, mcgrathr. leonardchan added a project: Sanitizers. Herald added subscribers: jfb, mgorny, dberris. leonardchan requested review of this revision. Herald added a subscriber: Sanitizers. This patch splits up hwasan thread creati

[PATCH] D104085: [compiler-rt][hwasan] Setup hwasan thread handling on Fuchsia

2021-06-10 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. The non-fuchsia stuff can be split up in a separate patch when ready, but I'll keep it here for now until we're set on the thread handling. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104085/new/ https://reviews.llvm

[PATCH] D103936: [compiler-rt][hwasan] Define fuchsia implementations of required hwasan functions

2021-06-11 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 351510. leonardchan marked an inline comment as done. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103936/new/ https://reviews.llvm.org/D103936 Files: compiler-rt/lib/hwasan/CMakeLists.txt compiler-rt/l

[PATCH] D103936: [compiler-rt][hwasan] Define fuchsia implementations of required hwasan functions

2021-06-11 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added inline comments. Comment at: compiler-rt/lib/hwasan/hwasan_fuchsia.cpp:29 + +uptr kHighMemEnd; +uptr kHighMemBeg; mcgrathr wrote: > These need comments about what they are and why they need to exist as runtime > variables at all. `kHighMemEnd`

[PATCH] D103936: [compiler-rt][hwasan] Define fuchsia implementations of required hwasan functions

2021-06-14 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 351931. leonardchan marked 10 inline comments as done. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103936/new/ https://reviews.llvm.org/D103936 Files: compiler-rt/lib/hwasan/CMakeLists.txt compiler-rt/

[PATCH] D104248: [compiler-rt][hwasan] Move Thread::Init into hwasan_linux.cpp

2021-06-14 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan created this revision. leonardchan added reviewers: eugenis, vitalybuka, pcc. leonardchan added a project: Sanitizers. Herald added a subscriber: dberris. leonardchan requested review of this revision. Herald added a subscriber: Sanitizers. This allows for other implementations to defi

[PATCH] D104248: [compiler-rt][hwasan] Move Thread::Init into hwasan_linux.cpp

2021-06-14 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 351953. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104248/new/ https://reviews.llvm.org/D104248 Files: compiler-rt/lib/hwasan/hwasan_thread.cpp compiler-rt/lib/hwasan/hwasan_thread.h Index: compiler

[PATCH] D104248: [compiler-rt][hwasan] Move Thread::Init into hwasan_linux.cpp

2021-06-14 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 351957. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104248/new/ https://reviews.llvm.org/D104248 Files: compiler-rt/lib/hwasan/hwasan_linux.cpp compiler-rt/lib/hwasan/hwasan_thread.cpp compiler-rt/li

[PATCH] D104248: [compiler-rt][hwasan] Move Thread::Init into hwasan_linux.cpp

2021-06-14 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added inline comments. Comment at: compiler-rt/lib/hwasan/hwasan_linux.cpp:430 +void Thread::Init(uptr stack_buffer_start, uptr stack_buffer_size) { + CHECK_EQ(0, unique_id_); // try to catch bad stack reuse mcgrathr wrote: > Most of this code can

[PATCH] D104248: [compiler-rt][hwasan] Refactor Thread::Init

2021-06-14 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan marked an inline comment as not done. leonardchan added inline comments. Comment at: compiler-rt/lib/hwasan/hwasan_linux.cpp:430 +void Thread::Init(uptr stack_buffer_start, uptr stack_buffer_size) { + CHECK_EQ(0, unique_id_); // try to catch bad stack reuse --

[PATCH] D103845: [compiler-rt][hwasan] Add newline between record_addr lines on frame record dumps

2021-06-14 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 351961. leonardchan edited the summary of this revision. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103845/new/ https://reviews.llvm.org/D103845 Files: compiler-rt/lib/hwasan/hwasan_report.cpp Index:

[PATCH] D104248: [compiler-rt][hwasan] Refactor Thread::Init

2021-06-14 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 352015. leonardchan marked an inline comment as not done. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104248/new/ https://reviews.llvm.org/D104248 Files: compiler-rt/lib/hwasan/hwasan_linux.cpp compile

[PATCH] D103845: [compiler-rt][hwasan] Add newline between record_addr lines on frame record dumps

2021-06-14 Thread Leonard Chan via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG312011899ac3: [compiler-rt][hwasan] Add newline between record_addr lines on frame record… (authored by leonardchan). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llv

[PATCH] D104275: [compiler-rt][hwasan] Add SHADOW_OFFSET macro

2021-06-14 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan created this revision. leonardchan added reviewers: vitalybuka, eugenis. leonardchan added a project: Sanitizers. Herald added a subscriber: dberris. leonardchan requested review of this revision. Herald added a subscriber: Sanitizers. Similar to `SHADOW_OFFSET` on asan, we can use thi

[PATCH] D104275: [compiler-rt][hwasan] Add GetShadowOffset function

2021-06-15 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 352186. leonardchan marked 2 inline comments as done. leonardchan retitled this revision from "[compiler-rt][hwasan] Add SHADOW_OFFSET macro" to "[compiler-rt][hwasan] Add GetShadowOffset function". Repository: rG LLVM Github Monorepo CHANGES SINCE LAS

[PATCH] D104275: [compiler-rt][hwasan] Add GetShadowOffset function

2021-06-15 Thread Leonard Chan 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 rGfc006b3e5dc3: [compiler-rt][hwasan] Add GetShadowOffset function (authored by leonardchan). Repository: rG LLVM Github Monorepo CHANGES SINCE LAS

[PATCH] D103936: [compiler-rt][hwasan] Define fuchsia implementations of required hwasan functions

2021-06-15 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 352194. leonardchan added a comment. Rebase and remove `__hwasan_shadow_memory_dynamic_address`. We don't need to set it anymore. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103936/new/ https://reviews.l

[PATCH] D104248: [compiler-rt][hwasan] Refactor Thread::Init

2021-06-16 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 352476. leonardchan marked an inline comment as done. leonardchan added a comment. Rebased and formatted. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104248/new/ https://reviews.llvm.org/D104248 Files:

[PATCH] D99381: [compiler-rt][hwasan] Add Fuchsia-specific sanitizer platform limits

2021-06-17 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. *ping* Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99381/new/ https://reviews.llvm.org/D99381 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org

[PATCH] D103544: [compiler-rt][Fuchsia] Disable interceptors while enabling new/delete replacements

2021-06-17 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. *ping* Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103544/new/ https://reviews.llvm.org/D103544 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.o

[PATCH] D103936: [compiler-rt][hwasan] Define fuchsia implementations of required hwasan functions

2021-06-17 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. *ping* Anything else that should be updated? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103936/new/ https://reviews.llvm.org/D103936 ___ cfe-commits mailing list cfe-commi

[PATCH] D104248: [compiler-rt][hwasan] Refactor Thread::Init

2021-06-17 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. Will submit around end of day if there's no more comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104248/new/ https://reviews.llvm.org/D104248 ___ cfe-commits mailing

[PATCH] D104248: [compiler-rt][hwasan] Refactor Thread::Init

2021-06-18 Thread Leonard Chan via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was automatically updated to reflect the committed changes. Closed by commit rG88d93923e665: [compiler-rt][hwasan] Move Thread::Init into hwasan_linux.cpp (authored by leonardchan). Repository: rG L

[PATCH] D104553: [compiler-rt][hwasan] Add InitState options to thread initialization

2021-06-18 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan created this revision. leonardchan added reviewers: phosek, mcgrathr, vitalybuka, eugenis. leonardchan added a project: Sanitizers. Herald added a subscriber: dberris. leonardchan requested review of this revision. Herald added a subscriber: Sanitizers. Similar to `InitOptions` in asan

[PATCH] D104561: [NFC][compiler-rt][hwasan] Move hwasanThreadList().CreateCurrentThread() into InitThreads

2021-06-18 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan created this revision. leonardchan added reviewers: phosek, mcgrathr, vitalybuka, eugenis. leonardchan added a project: Sanitizers. Herald added a subscriber: dberris. leonardchan requested review of this revision. Herald added a subscriber: Sanitizers. Once D104553

[PATCH] D104561: [NFC][compiler-rt][hwasan] Move hwasanThreadList().CreateCurrentThread() into InitThreads

2021-06-18 Thread Leonard Chan 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 rGf7999e73caef: [NFC][compiler-rt][hwasan] Move hwasanThreadList().CreateCurrentThread() into… (authored by leonardchan). Repository: rG LLVM Github

[PATCH] D104553: [compiler-rt][hwasan] Add InitState options to thread initialization

2021-06-21 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 353421. leonardchan marked an inline comment as done. leonardchan added a comment. Updated and rebased. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104553/new/ https://reviews.llvm.org/D104553 Files: c

[PATCH] D104553: [compiler-rt][hwasan] Add InitState options to thread initialization

2021-06-22 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. *ping* Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104553/new/ https://reviews.llvm.org/D104553 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.o

[PATCH] D104553: [compiler-rt][hwasan] Add InitState options to thread initialization

2021-06-23 Thread Leonard Chan via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGb06fbdeae752: [compiler-rt][hwasan] Add InitState options to thread initialization (authored by leonardchan). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D1

[PATCH] D104085: [compiler-rt][hwasan] Setup hwasan thread handling on Fuchsia

2021-06-23 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 354098. leonardchan marked 7 inline comments as done. leonardchan edited the summary of this revision. leonardchan added a comment. Rebased against recent refactoring commits and addressed some comments. I think I can omit some functions like `GetCurrentT

[PATCH] D104085: [compiler-rt][hwasan] Setup hwasan thread handling on Fuchsia

2021-06-23 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan planned changes to this revision. leonardchan added inline comments. Comment at: compiler-rt/lib/hwasan/hwasan_fuchsia.cpp:41 +void InitThreads() { + uptr alloc_size = UINT64_C(1) << kShadowBaseAlignment; + uptr thread_start = reinterpret_cast( mcgr

[PATCH] D99381: [compiler-rt][hwasan] Remove __sanitizer allocation functions from hwasan interface

2021-07-30 Thread Leonard Chan 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 rGb4c00b388285: [compiler-rt][hwasan] Remove __sanitizer allocation functions from hwasan… (authored by leonardchan). Repository: rG LLVM Github Mon

[PATCH] D103543: [compiler-rt][Fuchsia] Support HWASan on Fuchsia

2021-07-30 Thread Leonard Chan via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG606ca48d79f3: [compiler-rt][Fuchsia] Support HWASan on Fuchsia (authored by leonardchan). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103543/new/ https://

[PATCH] D99364: [clang][cache] Update Fuchsia-stage2.cmake to create hwasan multilibs

2021-07-30 Thread Leonard Chan via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGbb438f6cbfc0: [clang][cache] Update Fuchsia-stage2.cmake to create hwasan multilibs (authored by leonardchan). Changed prior to commit: https://reviews.llvm.org/D99364?vs=349700&id=363173#toc Repositor

[PATCH] D96033: [clang-repl] Land initial infrastructure for incremental parsing

2021-08-13 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. We're still hitting the OOMs when building clang-repl with LTO even with `-DLLVM_PARALLEL_LINK_JOBS=32`. While we don't build this target explicitly in our toolchain, it is built when running tests via `stage2-check-clang`. Is there perhaps a simple cmake flag that

[PATCH] D108173: [WIP][clang] Add a cmake flag for choosing to build clang-repl

2021-08-16 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan created this revision. leonardchan added a project: clang. Herald added a subscriber: mgorny. leonardchan requested review of this revision. Not all downstream users may want to build all tools shipped with clang. `clang-repl` for us in particular can sometimes lead to flaky builds wh

[PATCH] D108173: [WIP][clang] Add a cmake flag for choosing to build clang-repl

2021-08-16 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan planned changes to this revision. leonardchan added inline comments. Comment at: clang/CMakeLists.txt:468 +option(CLANG_BUILD_CLANG_REPL_DEFAULT "Build clang-repl by default." OFF) + Apart from name bikeshedding, it's more likely we'll want this `ON

<    2   3   4   5   6   7   8   9   >