Page MenuHomePhabricator

leonardchan (Leonard Chan)
User

Projects

User does not belong to any projects.

User Details

User Since
Apr 25 2018, 1:47 PM (164 w, 5 d)

Recent Activity

Today

leonardchan updated the diff for D104553: [compiler-rt][hwasan] Add InitState options to thread initialization.

Updated and rebased.

Mon, Jun 21, 10:51 AM · Restricted Project

Fri, Jun 18

leonardchan committed rGf7999e73caef: [NFC][compiler-rt][hwasan] Move hwasanThreadList().CreateCurrentThread() into… (authored by leonardchan).
[NFC][compiler-rt][hwasan] Move hwasanThreadList().CreateCurrentThread() into…
Fri, Jun 18, 1:41 PM
leonardchan closed D104561: [NFC][compiler-rt][hwasan] Move hwasanThreadList().CreateCurrentThread() into InitThreads.
Fri, Jun 18, 1:41 PM · Restricted Project
leonardchan requested review of D104561: [NFC][compiler-rt][hwasan] Move hwasanThreadList().CreateCurrentThread() into InitThreads.
Fri, Jun 18, 11:27 AM · Restricted Project
leonardchan requested review of D104553: [compiler-rt][hwasan] Add InitState options to thread initialization.
Fri, Jun 18, 10:56 AM · Restricted Project
leonardchan committed rG88d93923e665: [compiler-rt][hwasan] Move Thread::Init into hwasan_linux.cpp (authored by leonardchan).
[compiler-rt][hwasan] Move Thread::Init into hwasan_linux.cpp
Fri, Jun 18, 10:36 AM
leonardchan closed D104248: [compiler-rt][hwasan] Refactor Thread::Init.
Fri, Jun 18, 10:36 AM · Restricted Project

Thu, Jun 17

leonardchan added a comment to D104248: [compiler-rt][hwasan] Refactor Thread::Init.

Will submit around end of day if there's no more comments.

Thu, Jun 17, 2:33 PM · Restricted Project
leonardchan added a comment to D79822: [AArch64] Emit CFI instruction for updating x18 when using ShadowCallStack with exception unwinding.

@pcc Do you happen to have a list of platforms that you suspect use libgcc and will break with this CFI? If this is a bug compatibility issue, we're thinking that instead of just disabling this for everyone, we should instead disable it for a blacklisted set of targets. So all targets by default would go through this branch except for those that actively crash from this.

Thu, Jun 17, 2:12 PM · Restricted Project
leonardchan added a comment to D103936: [compiler-rt][hwasan] Define fuchsia implementations of required hwasan functions.

*ping* Anything else that should be updated?

Thu, Jun 17, 11:08 AM · Restricted Project
leonardchan added a comment to D103544: [compiler-rt][Fuchsia] Disable interceptors while enabling new/delete replacements.

*ping*

Thu, Jun 17, 11:06 AM · Restricted Project
leonardchan added a comment to D99381: [compiler-rt][hwasan] Add Fuchsia-specific sanitizer platform limits.

*ping*

Thu, Jun 17, 11:06 AM · Restricted Project

Wed, Jun 16

leonardchan updated the diff for D104248: [compiler-rt][hwasan] Refactor Thread::Init.

Rebased and formatted.

Wed, Jun 16, 10:24 AM · Restricted Project

Tue, Jun 15

leonardchan updated the diff for D103936: [compiler-rt][hwasan] Define fuchsia implementations of required hwasan functions.

Rebase and remove __hwasan_shadow_memory_dynamic_address. We don't need to set it anymore.

Tue, Jun 15, 11:17 AM · Restricted Project
leonardchan committed rGfc006b3e5dc3: [compiler-rt][hwasan] Add GetShadowOffset function (authored by leonardchan).
[compiler-rt][hwasan] Add GetShadowOffset function
Tue, Jun 15, 10:48 AM
leonardchan closed D104275: [compiler-rt][hwasan] Add GetShadowOffset function.
Tue, Jun 15, 10:48 AM · Restricted Project
leonardchan updated the diff for D104275: [compiler-rt][hwasan] Add GetShadowOffset function.
Tue, Jun 15, 10:44 AM · Restricted Project

Mon, Jun 14

leonardchan requested review of D104275: [compiler-rt][hwasan] Add GetShadowOffset function.
Mon, Jun 14, 6:29 PM · Restricted Project
leonardchan committed rG312011899ac3: [compiler-rt][hwasan] Add newline between record_addr lines on frame record… (authored by leonardchan).
[compiler-rt][hwasan] Add newline between record_addr lines on frame record…
Mon, Jun 14, 5:14 PM
leonardchan closed D103845: [compiler-rt][hwasan] Add newline between record_addr lines on frame record dumps.
Mon, Jun 14, 5:14 PM · Restricted Project
leonardchan updated the diff for D104248: [compiler-rt][hwasan] Refactor Thread::Init.
Mon, Jun 14, 4:27 PM · Restricted Project
leonardchan updated the diff for D103845: [compiler-rt][hwasan] Add newline between record_addr lines on frame record dumps.
Mon, Jun 14, 12:12 PM · Restricted Project
leonardchan added inline comments to D104248: [compiler-rt][hwasan] Refactor Thread::Init.
Mon, Jun 14, 12:05 PM · Restricted Project
leonardchan retitled D104248: [compiler-rt][hwasan] Refactor Thread::Init from [compiler-rt][hwasan] Move Thread::Init into hwasan_linux.cpp to [compiler-rt][hwasan] Refactor Thread::Init.
Mon, Jun 14, 12:04 PM · Restricted Project
leonardchan added inline comments to D104248: [compiler-rt][hwasan] Refactor Thread::Init.
Mon, Jun 14, 12:03 PM · Restricted Project
leonardchan updated the diff for D104248: [compiler-rt][hwasan] Refactor Thread::Init.
Mon, Jun 14, 12:01 PM · Restricted Project
leonardchan updated the diff for D104248: [compiler-rt][hwasan] Refactor Thread::Init.
Mon, Jun 14, 11:59 AM · Restricted Project
leonardchan requested review of D104248: [compiler-rt][hwasan] Refactor Thread::Init.
Mon, Jun 14, 11:18 AM · Restricted Project
leonardchan updated the diff for D103936: [compiler-rt][hwasan] Define fuchsia implementations of required hwasan functions.
Mon, Jun 14, 10:58 AM · Restricted Project

Fri, Jun 11

leonardchan added inline comments to D103936: [compiler-rt][hwasan] Define fuchsia implementations of required hwasan functions.
Fri, Jun 11, 11:25 AM · Restricted Project
leonardchan updated the diff for D103936: [compiler-rt][hwasan] Define fuchsia implementations of required hwasan functions.
Fri, Jun 11, 11:25 AM · Restricted Project

Thu, Jun 10

leonardchan added a comment to D104085: [compiler-rt][hwasan] Setup hwasan thread handling on Fuchsia.

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.

Thu, Jun 10, 6:32 PM · Restricted Project
leonardchan requested review of D104085: [compiler-rt][hwasan] Setup hwasan thread handling on Fuchsia.
Thu, Jun 10, 6:27 PM · Restricted Project

Wed, Jun 9

leonardchan committed rG314c049142ed: [compiler-rt][hwasan] Decouple use of the TLS global for getting the shadow… (authored by leonardchan).
[compiler-rt][hwasan] Decouple use of the TLS global for getting the shadow…
Wed, Jun 9, 12:55 PM
leonardchan closed D103841: [llvm][hwasan] Decouple use of the TLS global for getting the shadow base and using the frame record feature .
Wed, Jun 9, 12:55 PM · Restricted Project, Restricted Project
leonardchan added inline comments to D103841: [llvm][hwasan] Decouple use of the TLS global for getting the shadow base and using the frame record feature .
Wed, Jun 9, 12:51 PM · Restricted Project, Restricted Project
leonardchan updated the diff for D103841: [llvm][hwasan] Decouple use of the TLS global for getting the shadow base and using the frame record feature .
Wed, Jun 9, 12:51 PM · Restricted Project, Restricted Project

Tue, Jun 8

leonardchan added a comment to D103936: [compiler-rt][hwasan] Define fuchsia implementations of required hwasan functions.

Let me know if these functions should be split up or can land together.

Tue, Jun 8, 5:24 PM · Restricted Project
leonardchan requested review of D103936: [compiler-rt][hwasan] Define fuchsia implementations of required hwasan functions.
Tue, Jun 8, 5:21 PM · Restricted Project
leonardchan added a comment to D103845: [compiler-rt][hwasan] Add newline between record_addr lines on frame record dumps.

Oh, actually @pcc was right on closer inspection. This is a misunderstanding on my end. So the {{bt:...}}} comes from

Tue, Jun 8, 4:52 PM · Restricted Project
leonardchan added inline comments to D103841: [llvm][hwasan] Decouple use of the TLS global for getting the shadow base and using the frame record feature .
Tue, Jun 8, 4:33 PM · Restricted Project, Restricted Project
leonardchan updated the diff for D103841: [llvm][hwasan] Decouple use of the TLS global for getting the shadow base and using the frame record feature .
Tue, Jun 8, 4:32 PM · Restricted Project, Restricted Project
leonardchan committed rGa9ea0a6a77b3: Fix for failing test mentioned in https://reviews.llvm.org/D103564. (authored by leonardchan).
Fix for failing test mentioned in https://reviews.llvm.org/D103564.
Tue, Jun 8, 12:38 PM
leonardchan added a comment to D103564: [NFC][compiler-rt][hwasan] Move allocation functions into their own file.

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 free ../../compiler-rt/lib/hwasan/hwasan_allocation_functions.cpp:75:3

need to update the path in that test

Tue, Jun 8, 12:38 PM · Restricted Project
leonardchan added inline comments to D103841: [llvm][hwasan] Decouple use of the TLS global for getting the shadow base and using the frame record feature .
Tue, Jun 8, 12:20 PM · Restricted Project, Restricted Project
leonardchan committed rG944b3c53aec5: [NFC][compiler-rt][hwasan] Move allocation functions into their own file (authored by leonardchan).
[NFC][compiler-rt][hwasan] Move allocation functions into their own file
Tue, Jun 8, 12:09 PM
leonardchan closed D103564: [NFC][compiler-rt][hwasan] Move allocation functions into their own file.
Tue, Jun 8, 12:09 PM · Restricted Project
leonardchan added inline comments to D103564: [NFC][compiler-rt][hwasan] Move allocation functions into their own file.
Tue, Jun 8, 12:07 PM · Restricted Project
leonardchan updated the diff for D103564: [NFC][compiler-rt][hwasan] Move allocation functions into their own file.
Tue, Jun 8, 12:07 PM · Restricted Project
leonardchan added a comment to D103845: [compiler-rt][hwasan] Add newline between record_addr lines on frame record dumps.

This isn't how the output looks on Android. Are you sure this isn't a Fuchsia-specific bug in the output formatting?

Tue, Jun 8, 12:01 PM · Restricted Project
leonardchan accepted D103919: [CMake][Fuchsia] Use PIC for Fuchsia runtimes.

Should _LLVM_ENABLE_PIC ON also be added for the multilibs?

Tue, Jun 8, 11:50 AM · Restricted Project
leonardchan accepted D103918: [CMake][Fuchsia] Include llvm-otool in Fuchsia toolchain.
Tue, Jun 8, 11:06 AM · Restricted Project
leonardchan accepted D103916: [CMake] Only include LTO on Apple targets.
Tue, Jun 8, 10:56 AM · Restricted Project

Mon, Jun 7

leonardchan retitled D103841: [llvm][hwasan] Decouple use of the TLS global for getting the shadow base and using the frame record feature from [compiler-rt][hwasan] Decouple use of the TLS global for getting the shadow base and using the frame record feature to [llvm][hwasan] Decouple use of the TLS global for getting the shadow base and using the frame record feature .
Mon, Jun 7, 3:38 PM · Restricted Project, Restricted Project
leonardchan updated the summary of D103564: [NFC][compiler-rt][hwasan] Move allocation functions into their own file.
Mon, Jun 7, 3:34 PM · Restricted Project
leonardchan updated the diff for D103564: [NFC][compiler-rt][hwasan] Move allocation functions into their own file.

Followed up with Roland's suggestion and moved everything relating to the allocation functions.

Mon, Jun 7, 3:34 PM · Restricted Project
leonardchan updated the summary of D103845: [compiler-rt][hwasan] Add newline between record_addr lines on frame record dumps.
Mon, Jun 7, 2:50 PM · Restricted Project
leonardchan requested review of D103845: [compiler-rt][hwasan] Add newline between record_addr lines on frame record dumps.
Mon, Jun 7, 2:48 PM · Restricted Project
leonardchan requested review of D103841: [llvm][hwasan] Decouple use of the TLS global for getting the shadow base and using the frame record feature .
Mon, Jun 7, 2:00 PM · Restricted Project, Restricted Project

Thu, Jun 3

leonardchan retitled D103564: [NFC][compiler-rt][hwasan] Move allocation functions into their own file from [NFC][compiler-rt][hwasan] Wrap vfork interceptor with HWASAN_WITH_INTERCEPTORS to [NFC][compiler-rt][hwasan] Wrap fork interceptor with HWASAN_WITH_INTERCEPTORS.
Thu, Jun 3, 3:34 PM · Restricted Project
leonardchan updated the diff for D103564: [NFC][compiler-rt][hwasan] Move allocation functions into their own file.

I think probably the better refactoring here would be to split this file in two: one containing just the allocation functions; and a second with everything else.
On Fuchsia, we'll use the allocation functions but none of the rest of it. So the second whole file could just be under #if !SANITIZER_FUCHSIA.

Thu, Jun 3, 3:34 PM · Restricted Project
leonardchan updated the diff for D99364: [clang][cache] Update Fuchsia-stage2.cmake to create hwasan multilibs.

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.

Thu, Jun 3, 2:55 PM · Restricted Project
leonardchan committed rGd4e4799998b8: [NFC][compiler-rt][hwasan] Refactor hwasan functions (authored by leonardchan).
[NFC][compiler-rt][hwasan] Refactor hwasan functions
Thu, Jun 3, 2:27 PM
leonardchan closed D103562: [NFC][compiler-rt][hwasan] Refactor hwasan functions.
Thu, Jun 3, 2:27 PM · Restricted Project
leonardchan updated the diff for D103562: [NFC][compiler-rt][hwasan] Refactor hwasan functions.
Thu, Jun 3, 2:22 PM · Restricted Project

Wed, Jun 2

leonardchan updated the diff for D103562: [NFC][compiler-rt][hwasan] Refactor hwasan functions.
Wed, Jun 2, 3:40 PM · Restricted Project
leonardchan requested review of D103564: [NFC][compiler-rt][hwasan] Move allocation functions into their own file.
Wed, Jun 2, 3:33 PM · Restricted Project
leonardchan updated the diff for D103544: [compiler-rt][Fuchsia] Disable interceptors while enabling new/delete replacements.
Wed, Jun 2, 3:25 PM · Restricted Project
leonardchan requested review of D103562: [NFC][compiler-rt][hwasan] Refactor hwasan functions.
Wed, Jun 2, 3:15 PM · Restricted Project
leonardchan accepted D103555: [Fuchsia] Use libc++abi on Windows in Fuchsia toolchain.
Wed, Jun 2, 2:28 PM · Restricted Project
leonardchan requested review of D103544: [compiler-rt][Fuchsia] Disable interceptors while enabling new/delete replacements.
Wed, Jun 2, 11:33 AM · Restricted Project
leonardchan requested review of D103543: [compiler-rt][Fuchsia] Support HWASan on Fuchsia.
Wed, Jun 2, 11:22 AM · Restricted Project

Tue, Jun 1

leonardchan committed rGe6f88dc01a72: [clang][Fuchsia] Turn on relative-vtables by default for Fuchsia (authored by leonardchan).
[clang][Fuchsia] Turn on relative-vtables by default for Fuchsia
Tue, Jun 1, 3:47 PM
leonardchan closed D102374: [clang][Fuchsia] Turn on relative-vtables by default for Fuchsia.
Tue, Jun 1, 3:46 PM · Restricted Project
leonardchan committed rGda1db4940965: [Fuchsia] Add compat multilibs to cache file (authored by leonardchan).
[Fuchsia] Add compat multilibs to cache file
Tue, Jun 1, 3:15 PM
leonardchan closed D103477: [Fuchsia] Add compat multilibs to cache file.
Tue, Jun 1, 3:15 PM · Restricted Project
leonardchan requested review of D103477: [Fuchsia] Add compat multilibs to cache file.
Tue, Jun 1, 11:28 AM · Restricted Project

Wed, May 26

leonardchan accepted D103218: [Fuchsia][CMake] Add missing include path..
Wed, May 26, 7:48 PM · Restricted Project
leonardchan added a comment to D96418: [clang] Refactor mustprogress handling, add it to all loops in c++11+..

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 value in using this stronger rule in C++, but I think it would help to understand the problem a little better. I assume this is causing problems for a less trivial test case? Or do you really have code that's relying on that loop not terminating?

Wed, May 26, 4:37 PM · Restricted Project

Tue, May 25

leonardchan added a comment to D96418: [clang] Refactor mustprogress handling, add it to all loops in c++11+..

Hi all, it looks like this commit led to some unexpected behavior in our build. When compiling something like:

Tue, May 25, 3:02 PM · Restricted Project

May 17 2021

leonardchan planned changes to D91466: [WIP][clang][Fuchsia] Support HWASan for Fuchsia.
May 17 2021, 10:38 AM · Restricted Project, Restricted Project, Restricted Project
leonardchan updated the diff for D91466: [WIP][clang][Fuchsia] Support HWASan for Fuchsia.

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.

May 17 2021, 10:37 AM · Restricted Project, Restricted Project, Restricted Project

May 14 2021

leonardchan added a comment to rG5aafcb2b440f: [Polly] Add support for -polly-position=early with the NPM..

Hi. Looks like this patch might be causing the failure we're seeing on our clang builders (https://luci-milo.appspot.com/p/fuchsia/builders/ci/clang-linux-x64/b8847235218143593424):

May 14 2021, 12:00 PM
leonardchan updated the diff for D102374: [clang][Fuchsia] Turn on relative-vtables by default for Fuchsia.
May 14 2021, 10:21 AM · Restricted Project

May 13 2021

leonardchan added a comment to D102374: [clang][Fuchsia] Turn on relative-vtables by default for Fuchsia.

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.

May 13 2021, 2:50 PM · Restricted Project
leonardchan updated the diff for D102374: [clang][Fuchsia] Turn on relative-vtables by default for Fuchsia.

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. This is needed so we can set the default value of this option depending on the target.

May 13 2021, 2:48 PM · Restricted Project
leonardchan added inline comments to D102374: [clang][Fuchsia] Turn on relative-vtables by default for Fuchsia.
May 13 2021, 11:09 AM · Restricted Project

May 12 2021

leonardchan added reviewers for D102374: [clang][Fuchsia] Turn on relative-vtables by default for Fuchsia: phosek, mcgrathr.
May 12 2021, 3:29 PM · Restricted Project
leonardchan updated the summary of D102374: [clang][Fuchsia] Turn on relative-vtables by default for Fuchsia.
May 12 2021, 3:19 PM · Restricted Project
leonardchan planned changes to D102374: [clang][Fuchsia] Turn on relative-vtables by default for Fuchsia.
May 12 2021, 3:15 PM · Restricted Project
leonardchan requested review of D102374: [clang][Fuchsia] Turn on relative-vtables by default for Fuchsia.
May 12 2021, 3:15 PM · Restricted Project

May 11 2021

leonardchan added a comment to rGcbcfca343f02: [JITLink] Make LinkGraph debug dumps more readable..

I think either this or one of the following two JITLink-related commits (74a96b4c98434e328eeca0afc85dc7053133a7d2, a0162a81b1377331c3e0ebb58ac349b2ffd7b598) might've led to the test failures we're seeing on our clang builders (https://luci-milo.appspot.com/p/fuchsia/builders/ci/clang-linux-x64/b8847489160968241440):

May 11 2021, 4:21 PM
leonardchan committed rG5cb17728d194: [clang][Fuchsia] Introduce compat multilibs (authored by leonardchan).
[clang][Fuchsia] Introduce compat multilibs
May 11 2021, 3:46 PM
leonardchan closed D102030: [clang][Fuchsia] Introduce compat multilibs.
May 11 2021, 3:46 PM · Restricted Project
leonardchan added a comment to D101305: [LoopInterchange] Fix legality for triangular loops.

Looks like this patch might be leading to the test failure we're seeing on our two-stage-builders (https://luci-milo.appspot.com/p/fuchsia/builders/prod/clang-linux-x64/b8847508232983084096):

May 11 2021, 2:21 PM · Restricted Project

May 6 2021

leonardchan updated the diff for D102030: [clang][Fuchsia] Introduce compat multilibs.
May 6 2021, 4:18 PM · Restricted Project
leonardchan added inline comments to D102030: [clang][Fuchsia] Introduce compat multilibs.
May 6 2021, 4:12 PM · Restricted Project
leonardchan requested review of D102030: [clang][Fuchsia] Introduce compat multilibs.
May 6 2021, 3:56 PM · Restricted Project
leonardchan planned changes to D91466: [WIP][clang][Fuchsia] Support HWASan for Fuchsia.
May 6 2021, 3:24 PM · Restricted Project, Restricted Project, Restricted Project
leonardchan accepted D102013: [Fuchsia][CMake] Update OSX deployment target.
May 6 2021, 12:04 PM · Restricted Project