Page MenuHomePhabricator

pcc (Peter Collingbourne)
User

Projects

User does not belong to any projects.

User Details

User Since
Dec 28 2012, 2:34 PM (378 w, 4 d)

Recent Activity

Fri, Mar 27

pcc added a comment to D76322: tsan: Adding releaseAcquire() to ThreadClock.

It looks like this change broke the sanitizer-x86_64-linux-autoconf buildbot.
http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-autoconf/builds/48824

/b/sanitizer-x86_64-linux-autoconf/build/llvm-project/compiler-rt/lib/tsan/rtl/tsan_clock.cpp:190:13: error: use of undeclared identifier 'dst'
  DCHECK_LE(dst->size_, kMaxTid);
            ^
1 error generated.

Can you please take a look?

Fri, Mar 27, 1:43 PM

Thu, Mar 26

pcc added a comment to D76578: [compiler-rt] Intercept the uname() function.

This change broke the sanitizer-x86_64-linux bot: http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux/builds/26313
Please take a look.

Thu, Mar 26, 12:33 PM · Restricted Project

Mon, Mar 23

pcc committed rG8140f6bcde42: scudo: Create a public include directory. NFCI. (authored by pcc).
scudo: Create a public include directory. NFCI.
Mon, Mar 23, 6:32 PM
pcc closed D76648: scudo: Create a public include directory. NFCI..
Mon, Mar 23, 6:32 PM · Restricted Project
pcc created D76648: scudo: Create a public include directory. NFCI..
Mon, Mar 23, 4:21 PM · Restricted Project
pcc added a comment to D76410: [ELF] Don't combine SHF_LINK_ORDER sections linking different output sections.

Having given this some more thought, I'm still not in favour of this change even with start/stop symbols excluded, since there are other cases where enumeration of SHF_LINK_ORDER sections may be possible/desirable. To give one example, imagine that you have .init_array sections linked to the globals that they initialize (this may be possible if you can prove that the constructor has no side effects other than initializing the object). With this change we may for example have multiple .init_array sections for .bss and .data, which would need to be accounted for when computing DT_INIT_ARRAY/DT_INIT_ARRAY_SZ. There are various ways that you could deal with this sort of situation, but it seems like the simplest one would be to stick with one output section per file.

Mon, Mar 23, 1:38 PM · Restricted Project
pcc added a comment to D76058: [OpenMPOpt] Validate declaration types against the expected types .

This change broke the msan buildbot: http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fast/builds/39755

==70358==WARNING: MemorySanitizer: use-of-uninitialized-value
    #0 0x5a602b2 in deleteParallelRegions /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/Transforms/IPO/OpenMPOpt.cpp:127:9
    #1 0x5a602b2 in (anonymous namespace)::OpenMPOpt::run() /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/Transforms/IPO/OpenMPOpt.cpp:116:16
    #2 0x5a94252 in (anonymous namespace)::OpenMPOptLegacyPass::runOnSCC(llvm::CallGraphSCC&) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/Transforms/IPO/OpenMPOpt.cpp:559:19
    #3 0x3f53893 in RunPassOnSCC /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/Analysis/CallGraphSCCPass.cpp:139:23
Mon, Mar 23, 12:33 PM · Restricted Project, Restricted Project

Fri, Mar 20

pcc requested changes to D76410: [ELF] Don't combine SHF_LINK_ORDER sections linking different output sections.
Fri, Mar 20, 5:22 PM · Restricted Project

Thu, Mar 12

pcc added inline comments to D75655: [Docs] Document -lto-whole-program-visibility.
Thu, Mar 12, 10:18 AM · Restricted Project

Thu, Mar 5

pcc added inline comments to D71913: [LTO/WPD] Enable aggressive WPD under LTO option.
Thu, Mar 5, 11:32 AM · Restricted Project, Restricted Project
pcc added a comment to D75617: [WPD] Provide a way to prevent function(s) from being devirtualized.

@pcc Just to clarify: I'm using this patch to identify problems with WPD (typically those are either invalid reinterpret_cast or open type hierarchy). I find it convenient to obtain a list of devirtualized functions using pass remarks, "undevirtualize" some of them relink and run. With attributes it seems to be much harder

Thu, Mar 5, 11:32 AM · Restricted Project
pcc added a comment to D75617: [WPD] Provide a way to prevent function(s) from being devirtualized.

There is already a way to do this, with the attribute [[clang::lto_visibility_public]]. Why do you need another one?

Thu, Mar 5, 10:57 AM · Restricted Project
pcc added inline comments to D75655: [Docs] Document -lto-whole-program-visibility.
Thu, Mar 5, 10:57 AM · Restricted Project

Tue, Mar 3

pcc added inline comments to D75382: [lld] Initial commit for new Mach-O backend.
Tue, Mar 3, 9:39 AM · Restricted Project

Mon, Mar 2

pcc added inline comments to D75382: [lld] Initial commit for new Mach-O backend.
Mon, Mar 2, 1:43 PM · Restricted Project
pcc added inline comments to D75382: [lld] Initial commit for new Mach-O backend.
Mon, Mar 2, 12:03 PM · Restricted Project
pcc added inline comments to D71913: [LTO/WPD] Enable aggressive WPD under LTO option.
Mon, Mar 2, 11:36 AM · Restricted Project, Restricted Project

Feb 24 2020

pcc committed rG0414c5694073: Revert "Rework go bindings so that validation works fine" (authored by pcc).
Revert "Rework go bindings so that validation works fine"
Feb 24 2020, 9:26 AM
pcc added a reverting change for rGe8f8873da5ea: Rework go bindings so that validation works fine: rG0414c5694073: Revert "Rework go bindings so that validation works fine".
Feb 24 2020, 9:26 AM
pcc added a comment to D75060: [test][go]Use -stdlib=libc++ to build GO binding test if LLVM is built with libc++.

This should be fixed by rG0414c5694073de26fd33a0276c47c6adea5284cf.

Feb 24 2020, 9:26 AM · Restricted Project
pcc added a comment to D74540: Rework go bindings so that binding tests work fine.

Now that llvm-go has been brought back, I've reverted this change.

Feb 24 2020, 9:26 AM · Restricted Project

Feb 13 2020

pcc accepted D74567: [scudo][standalone] Workaround for full regions on Android.

LGTM

Feb 13 2020, 12:52 PM · Restricted Project, Restricted Project
pcc accepted D74567: [scudo][standalone] Workaround for full regions on Android.

Does it make sense to write a test for this?

Feb 13 2020, 9:47 AM · Restricted Project, Restricted Project
pcc reopened D74540: Rework go bindings so that binding tests work fine.

This broke users of the go bindings who were using build.sh, and changed the import path for the bindings unnecessarily. Can we please just bring back llvm-go as I requested before?

Feb 13 2020, 8:42 AM · Restricted Project

Feb 11 2020

pcc committed rG87303fd91711: scudo: Fix various test failures, mostly on 32-bit. (authored by pcc).
scudo: Fix various test failures, mostly on 32-bit.
Feb 11 2020, 12:24 PM
pcc closed D74429: scudo: Fix various test failures, mostly on 32-bit..
Feb 11 2020, 12:24 PM · Restricted Project, Restricted Project
pcc added inline comments to D74429: scudo: Fix various test failures, mostly on 32-bit..
Feb 11 2020, 12:24 PM · Restricted Project, Restricted Project
pcc requested changes to D74430: [Go] Remove go bindings test as it depends on llvm-go.

We should bring back llvm-go instead. That program doesn't depend on llgo, it's mostly a helper for building the Go bindings.

Feb 11 2020, 11:46 AM · Restricted Project
pcc created D74429: scudo: Fix various test failures, mostly on 32-bit..
Feb 11 2020, 11:37 AM · Restricted Project, Restricted Project
pcc committed rG76d6bce62945: gn build: Make scudo cflags more consistent with the cmake build. (authored by pcc).
gn build: Make scudo cflags more consistent with the cmake build.
Feb 11 2020, 10:06 AM
pcc committed rG515e19ae7b5f: Fix errors/warnings in scudo build. (authored by pcc).
Fix errors/warnings in scudo build.
Feb 11 2020, 8:38 AM

Feb 10 2020

pcc committed rGe79c3b4c2d22: scudo: Fix Android build. (authored by pcc).
scudo: Fix Android build.
Feb 10 2020, 5:07 PM
pcc closed D74366: scudo: Fix Android build..
Feb 10 2020, 5:06 PM · Restricted Project, Restricted Project
pcc created D74366: scudo: Fix Android build..
Feb 10 2020, 3:55 PM · Restricted Project, Restricted Project
pcc committed rG9068766b9a52: scudo: Add a dump of primary allocation sizes to malloc_info output. (authored by pcc).
scudo: Add a dump of primary allocation sizes to malloc_info output.
Feb 10 2020, 3:10 PM
pcc closed D74098: scudo: Add a dump of primary allocation sizes to malloc_info output..
Feb 10 2020, 3:10 PM · Restricted Project, Restricted Project
pcc committed rG681773f2919d: scudo: Instead of exporting a pointer to the allocator, export the allocator… (authored by pcc).
scudo: Instead of exporting a pointer to the allocator, export the allocator…
Feb 10 2020, 3:01 PM
pcc committed rG041547eb4eb0: scudo: Table driven size classes for Android allocator. (authored by pcc).
scudo: Table driven size classes for Android allocator.
Feb 10 2020, 3:01 PM
pcc closed D73824: scudo: Table driven size classes for Android allocator..
Feb 10 2020, 3:01 PM · Restricted Project, Restricted Project
pcc closed D74356: scudo: Instead of exporting a pointer to the allocator, export the allocator directly. NFCI..
Feb 10 2020, 3:01 PM · Restricted Project, Restricted Project
pcc updated the diff for D73824: scudo: Table driven size classes for Android allocator..
  • Adjust the test to use MaxSize-64
Feb 10 2020, 1:57 PM · Restricted Project, Restricted Project
pcc created D74356: scudo: Instead of exporting a pointer to the allocator, export the allocator directly. NFCI..
Feb 10 2020, 1:48 PM · Restricted Project, Restricted Project
pcc added inline comments to D73824: scudo: Table driven size classes for Android allocator..
Feb 10 2020, 10:09 AM · Restricted Project, Restricted Project

Feb 7 2020

pcc added reviewers for D73824: scudo: Table driven size classes for Android allocator.: cryptoad, cferris.
Feb 7 2020, 7:31 PM · Restricted Project, Restricted Project
pcc added a comment to D73824: scudo: Table driven size classes for Android allocator..

PTAL

Feb 7 2020, 7:31 PM · Restricted Project, Restricted Project
pcc updated the diff for D73824: scudo: Table driven size classes for Android allocator..

Finalize

Feb 7 2020, 7:31 PM · Restricted Project, Restricted Project
pcc updated the diff for D74098: scudo: Add a dump of primary allocation sizes to malloc_info output..
  • Zero initialize array
Feb 7 2020, 4:32 PM · Restricted Project, Restricted Project
pcc updated the diff for D74098: scudo: Add a dump of primary allocation sizes to malloc_info output..
  • Use heap
Feb 7 2020, 3:38 PM · Restricted Project, Restricted Project
pcc accepted D74178: [scudo][standalone] 32-bit improvement.

LGTM

Feb 7 2020, 10:45 AM · Restricted Project, Restricted Project

Feb 6 2020

pcc committed rG7931e8eee3da: Update hwasan docs to cover outlined checks and globals. (authored by pcc).
Update hwasan docs to cover outlined checks and globals.
Feb 6 2020, 5:45 PM
pcc closed D74150: Update hwasan docs to cover outlined checks and globals..
Feb 6 2020, 5:45 PM · Restricted Project
pcc added inline comments to D74150: Update hwasan docs to cover outlined checks and globals..
Feb 6 2020, 5:45 PM · Restricted Project
pcc added inline comments to D74178: [scudo][standalone] 32-bit improvement.
Feb 6 2020, 4:23 PM · Restricted Project, Restricted Project
pcc created D74150: Update hwasan docs to cover outlined checks and globals..
Feb 6 2020, 11:19 AM · Restricted Project
pcc added inline comments to D74142: [GWP-ASan] Use weak abort message definition..
Feb 6 2020, 10:40 AM · Restricted Project, Restricted Project
pcc accepted D74135: [GWP-ASan] Fix PRNG to use IE TLS..

LGTM

Feb 6 2020, 10:02 AM · Restricted Project, Restricted Project
pcc committed rGdab7bdad0492: scudo: Delete unused class ScudoByteMap. NFCI. (authored by pcc).
scudo: Delete unused class ScudoByteMap. NFCI.
Feb 6 2020, 9:35 AM
pcc closed D74099: scudo: Delete unused class TwoLevelByteMap. NFCI..
Feb 6 2020, 9:35 AM · Restricted Project, Restricted Project
pcc added inline comments to D74098: scudo: Add a dump of primary allocation sizes to malloc_info output..
Feb 6 2020, 9:19 AM · Restricted Project, Restricted Project

Feb 5 2020

pcc created D74099: scudo: Delete unused class TwoLevelByteMap. NFCI..
Feb 5 2020, 4:47 PM · Restricted Project, Restricted Project
pcc retitled D74099: scudo: Delete unused class TwoLevelByteMap. NFCI. from scudo: Delete unused class ScudoByteMap. NFCI. to scudo: Delete unused class TwoLevelByteMap. NFCI..
Feb 5 2020, 4:47 PM · Restricted Project, Restricted Project
pcc created D74098: scudo: Add a dump of primary allocation sizes to malloc_info output..
Feb 5 2020, 4:29 PM · Restricted Project, Restricted Project
pcc accepted D74072: [scudo][standalone] Fix a race in the secondary release.

LGTM

Feb 5 2020, 10:34 AM · Restricted Project, Restricted Project
pcc added inline comments to D64457: [GWP-ASan] Attempt to fix Android/ARM platforms..
Feb 5 2020, 8:03 AM · Restricted Project, Restricted Project

Feb 4 2020

pcc retitled D73824: scudo: Table driven size classes for Android allocator. from [wip] table driven size classes to [wip] scudo: Table driven size classes for Android allocator..
Feb 4 2020, 8:38 PM · Restricted Project, Restricted Project
pcc updated the diff for D73824: scudo: Table driven size classes for Android allocator..

New approach

Feb 4 2020, 8:30 PM · Restricted Project, Restricted Project
pcc committed rGf7de7084f4a2: scudo: Simplify getClassIdBySize() logic. NFCI. (authored by pcc).
scudo: Simplify getClassIdBySize() logic. NFCI.
Feb 4 2020, 9:35 AM
pcc closed D73936: scudo: Simplify getClassIdBySize() logic. NFCI..
Feb 4 2020, 9:35 AM · Restricted Project, Restricted Project

Feb 3 2020

pcc created D73936: scudo: Simplify getClassIdBySize() logic. NFCI..
Feb 3 2020, 4:40 PM · Restricted Project, Restricted Project
pcc committed rG47cda0cb36bf: scudo: Use more size classes in the malloc_free_loop benchmarks. (authored by pcc).
scudo: Use more size classes in the malloc_free_loop benchmarks.
Feb 3 2020, 1:24 PM
pcc closed D73918: scudo: Use more size classes in the malloc_free_loop benchmarks..
Feb 3 2020, 1:24 PM · Restricted Project, Restricted Project
pcc created D73918: scudo: Use more size classes in the malloc_free_loop benchmarks..
Feb 3 2020, 12:46 PM · Restricted Project, Restricted Project

Jan 31 2020

pcc created D73824: scudo: Table driven size classes for Android allocator..
Jan 31 2020, 6:33 PM · Restricted Project, Restricted Project
pcc accepted D73800: [gn build] add asan runtime on linux and mac.

LGTM

Jan 31 2020, 6:24 PM · Restricted Project
pcc accepted D73750: [scudo][standalone] Change default Android config.

LGTM

Jan 31 2020, 2:44 PM · Restricted Project, Restricted Project

Jan 30 2020

pcc accepted D73730: [scudo][standalone] Release secondary memory on purge.

LGTM

Jan 30 2020, 12:03 PM · Restricted Project, Restricted Project
pcc added inline comments to D64457: [GWP-ASan] Attempt to fix Android/ARM platforms..
Jan 30 2020, 11:14 AM · Restricted Project, Restricted Project

Jan 29 2020

pcc accepted D73631: [scudo] Skip building scudo standalone if sys/auxv.h can't be found.

LGTM

Jan 29 2020, 8:35 AM · Restricted Project, Restricted Project

Jan 27 2020

pcc added inline comments to D73507: [scudo][standalone] Secondary & general other improvements.
Jan 27 2020, 3:56 PM · Restricted Project, Restricted Project

Jan 24 2020

pcc added inline comments to D73307: Unique Names for Functions with Internal Linkage.
Jan 24 2020, 2:36 PM
pcc added a comment to D73310: Allow Module name to be used to generate a unique Module ID.

I am suggesting that you wouldn't change this function at all but would hash getSourceFileName yourself. (You shouldn't use getModuleIdentifier for anything that affects the contents of the output file because it isn't serialized.)

Jan 24 2020, 9:55 AM · Restricted Project
pcc added a comment to D73310: Allow Module name to be used to generate a unique Module ID.

If you don't need a guarantee of uniqueness wouldn't it be better to just take a hash of Module::getSourceFileName() instead of looking at the names of the globals?

Jan 24 2020, 8:23 AM · Restricted Project

Jan 21 2020

pcc added a comment to D73143: [scudo][standalone] Reduce Android region sizes to 128MB.

Fallback to a different allocator is hard, because then you need to implement PointerIsMine to redirect to the right allocator in free(), and AFAIK we don't have that in scudo for the larger allocations (i.e. secondary).

Jan 21 2020, 3:18 PM · Restricted Project, Restricted Project
pcc added inline comments to D70762: scudo: Add initial memory tagging support..
Jan 21 2020, 12:23 PM · Restricted Project, Restricted Project
pcc updated subscribers of D72959: Relative VTables ABI on Fuchsia.

On Aarch64, right now only CALL26 and JUMP26 instructions generate PLT relocations, so we manifest them with stubs that are just jumps to the original function.

Jan 21 2020, 11:27 AM · Restricted Project, Restricted Project

Jan 17 2020

pcc committed rG9b9c68a2d6ad: hwasan: Remove dead code. NFCI. (authored by pcc).
hwasan: Remove dead code. NFCI.
Jan 17 2020, 3:21 PM
pcc closed D72896: hwasan: Remove dead code. NFCI..
Jan 17 2020, 3:20 PM · Restricted Project, Restricted Project
pcc added a comment to D72899: [MC] Set sh_link to 0 if the associated symbol is undefined.
  1. Add a non-GC-root dummy section. This is a bit awkward to implement in MC because we have to pick a section name. The section may be combined with other normal sections with the same name. We need to be careful and not cause an "incompatible section flags" error (lld specific).
Jan 17 2020, 1:56 PM · Restricted Project
pcc committed rGcd40bd0a32e2: hwasan: Move .note.hwasan.globals note to hwasan.module_ctor comdat. (authored by pcc).
hwasan: Move .note.hwasan.globals note to hwasan.module_ctor comdat.
Jan 17 2020, 1:46 PM
pcc closed D72936: hwasan: Move .note.hwasan.globals note to hwasan.module_ctor comdat..
Jan 17 2020, 1:46 PM · Restricted Project
pcc accepted D72943: [ELF] Allow R_PLT_PC (R_PC) to a hidden undefined weak symbol.

LGTM

Jan 17 2020, 12:09 PM · Restricted Project
pcc created D72936: hwasan: Move .note.hwasan.globals note to hwasan.module_ctor comdat..
Jan 17 2020, 10:13 AM · Restricted Project

Jan 16 2020

pcc added a comment to D72892: [MC][ARM] Resolve some pcrel fixups at assembly time.

If we just want a quick fix then I would prefer if we consider strong hidden symbols to be non-preemptible. This just seems like it would cause our assembler to hide bugs of the sort that D72197 was intended to catch, while changing the behavior for hidden symbols would mean that we continue to catch those bugs.

Jan 16 2020, 6:24 PM · Restricted Project
pcc created D72896: hwasan: Remove dead code. NFCI..
Jan 16 2020, 6:15 PM · Restricted Project, Restricted Project
pcc added a comment to D72892: [MC][ARM] Resolve some pcrel fixups at assembly time.

Shouldn't we just implement support for the relocation instead?

Jan 16 2020, 5:10 PM · Restricted Project
pcc added a comment to D72197: [MC][ELF] Emit a relocation if target is defined in the same section and is non-local.
In D72197#1825012, @pcc wrote:

It looks like this change caused us to start rejecting:

.thumb
.thumb_func
.globl foo
.hidden foo
foo:
adr lr, foo + 1

with:

test.s:6:1: error: unsupported relocation on symbol
adr lr, foo + 1
^

This is exposed by this Android ART code: https://cs.android.com/android/platform/superproject/+/master:art/runtime/arch/arm/quick_entrypoints_arm.S;l=1826

I see a couple of possible fixes for this:

  1. We could go back to the previous behaviour for global hidden symbols.
  2. We could teach MC and LLD about the R_ARM_THM_ALU_PREL_11_0 relocation required to relocate this instruction. Arguably the ART code shouldn't be adding the 1 for Thumb here (because R_ARM_THM_ALU_PREL_11_0 adds the 1 itself), so ART would then need to be fixed.

foo is a hidden definition in the current object file. Can the ART code be changed to use a local symbol (adr lr, .Lfoo) instead?

Jan 16 2020, 3:34 PM · Restricted Project
pcc added a comment to D65653: [AArch64] Change location of frame-record within callee-save area..

Exception handling has to use a DWARF unwinder, not a "fast" unwinder. So the "fast" unwinder can't actually do anything with the address other than print it out.

Jan 16 2020, 2:24 PM · Restricted Project
pcc added a comment to D72197: [MC][ELF] Emit a relocation if target is defined in the same section and is non-local.
In D72197#1825012, @pcc wrote:

It looks like this change caused us to start rejecting:

.thumb
.thumb_func
.globl foo
.hidden foo
foo:
adr lr, foo + 1

with:

test.s:6:1: error: unsupported relocation on symbol
adr lr, foo + 1
^

This is exposed by this Android ART code: https://cs.android.com/android/platform/superproject/+/master:art/runtime/arch/arm/quick_entrypoints_arm.S;l=1826

I see a couple of possible fixes for this:

  1. We could go back to the previous behaviour for global hidden symbols.
  2. We could teach MC and LLD about the R_ARM_THM_ALU_PREL_11_0 relocation required to relocate this instruction. Arguably the ART code shouldn't be adding the 1 for Thumb here (because R_ARM_THM_ALU_PREL_11_0 adds the 1 itself), so ART would then need to be fixed.
% arm-linux-gnueabi-as /tmp/c/a.s -o /tmp/c/a.o
/tmp/c/a.s: Assembler messages:
/tmp/c/a.s:6: Error: invalid Hi register with immediate
/tmp/c/a.s:6: Error: invalid immediate for address calculation (value = 0xFFFFFFFFFFFFFFFE)

How can I make GNU as recognize it?

Jan 16 2020, 2:06 PM · Restricted Project
pcc committed rGc299d1981dea: scudo: Add initial memory tagging support. (authored by pcc).
scudo: Add initial memory tagging support.
Jan 16 2020, 1:37 PM
pcc closed D70762: scudo: Add initial memory tagging support..
Jan 16 2020, 1:36 PM · Restricted Project, Restricted Project