Page MenuHomePhabricator

phosek (Petr Hosek)
User

Projects

User does not belong to any projects.

User Details

User Since
Mar 4 2015, 5:44 PM (228 w, 4 d)

Recent Activity

Yesterday

phosek added a comment to D64378: [libcxx] Use C11 thread API on Fuchsia.

Ping? Anything else you'd like me to change?

Sun, Jul 21, 3:38 PM
phosek closed D65032: [ELF] Support explicitly overriding relocation model in LTO.
Sun, Jul 21, 2:58 PM · Restricted Project

Sat, Jul 20

phosek added a comment to D65029: [Driver] Support for disabling sanitizer runtime linking.
In D65029#1594437, @pcc wrote:

It's also worth asking whether -nodefaultlibs would work for this use case as @filcab suggested on D64547.

Sat, Jul 20, 6:36 PM · Restricted Project
phosek committed rGae4c30a4bed9: [ELF] Support explicitly overriding relocation model in LTO (authored by phosek).
[ELF] Support explicitly overriding relocation model in LTO
Sat, Jul 20, 3:00 PM
phosek committed rL366644: [ELF] Support explicitly overriding relocation model in LTO.
[ELF] Support explicitly overriding relocation model in LTO
Sat, Jul 20, 3:00 PM
phosek updated the diff for D65032: [ELF] Support explicitly overriding relocation model in LTO.
Sat, Jul 20, 3:00 PM · Restricted Project

Fri, Jul 19

phosek created D65032: [ELF] Support explicitly overriding relocation model in LTO.
Fri, Jul 19, 5:49 PM · Restricted Project
phosek created D65029: [Driver] Support for disabling sanitizer runtime linking.
Fri, Jul 19, 4:37 PM · Restricted Project
phosek updated the diff for D64979: [libc++] Set __file_ to 0 in basic_filebuf::close() even if fclose fails.

Test added, would it be possible to take a look?

Fri, Jul 19, 4:10 PM
phosek updated the diff for D64971: [SafeStack] Insert the deref after the offset.

I've moved the deref after the offset calculation, tested this against our build and it's producing the expected DWARF output.

Fri, Jul 19, 12:10 PM · Restricted Project
phosek added a comment to D64979: [libc++] Set __file_ to 0 in basic_filebuf::close() even if fclose fails.

Is it possible to add a test case?

Fri, Jul 19, 8:25 AM
phosek created D64979: [libc++] Set __file_ to 0 in basic_filebuf::close() even if fclose fails.
Fri, Jul 19, 12:49 AM
phosek added a comment to D64903: [ELF] Pad the last page of last PF_X PT_LOAD with traps when -z separate-code is specified.

I have several points on this.

Fri, Jul 19, 12:20 AM · Restricted Project

Thu, Jul 18

phosek created D64971: [SafeStack] Insert the deref after the offset.
Thu, Jul 18, 11:17 PM · Restricted Project

Tue, Jul 16

phosek added a comment to D64711: [LTO] Don't override relocation model stored in the module.
In D64711#1586864, @pcc wrote:

I guess I'd be fine with making it so that passing -relocation-model explicitly would override lld's decision (see e.g. how we handle function sections/data sections in the gold plugin). Then you can use -mllvm -relocation-model=pic for now.

Tue, Jul 16, 7:07 PM · Restricted Project

Mon, Jul 15

phosek added a comment to D64711: [LTO] Don't override relocation model stored in the module.
In D64711#1586738, @pcc wrote:
In D64711#1584916, @pcc wrote:

I'd like to understand the motivation behind this change a little better because the relaxation of the code model from PIC to static is technically an "optimization" that the linker should have license to perform and in fact is already performing in some ways (e.g. emitting addresses into the binary instead of RELATIVE/RELR relocations for statically known addresses).

In the case of our kernel, we need the generated code to be position independent for our KASLR scheme, but we're not doing traditional PIE link. When compiling individual translation units, we use -fpie, but when linking we use --no-pie. Changing the code model from PIC to static in this case results in an invalid kernel image because the generated code is not relocatable. I think it's a matter of principle that it shouldn't be the linker's responsibility to decide how to combine our code-generation choices with our linking choices. I'm open to suggestions for other ways to solve this issue though as we'd really like to be able to use ThinLTO for our kernel.

Have you considered linking the kernel as a PIE image when KASLR is enabled? This will fix not only this problem but also others (e.g. initializers containing global pointers, which might not just be explicit in the source code but could also be implicitly generated by the compiler, are broken with this scheme).

This is what the Linux kernel does (it uses -shared -Bsymbolic instead of -pie in KASLR mode, but they are almost equivalent):
https://github.com/torvalds/linux/blob/fec88ab0af9706b2201e5daf377c5031c62d11f7/arch/arm64/Makefile#L21

It uses assembly to self relocate to avoid depending on relative relocations during early startup:
https://github.com/torvalds/linux/blob/fec88ab0af9706b2201e5daf377c5031c62d11f7/arch/arm64/kernel/head.S#L822

Mon, Jul 15, 6:06 PM · Restricted Project
phosek added a comment to D64774: [DebugInfo] Move function from line table to the prologue (NFC).

This change broke lld:

/b/s/w/ir/k/llvm-project/lld/ELF/InputFiles.cpp:323:28: error: conversion function from 'nullptr_t' to 'llvm::StringRef' invokes a deleted function
          it->second.file, nullptr,
                           ^~~~~~~
/b/s/w/ir/k/llvm-project/lld/ELF/InputFiles.cpp:1637:21: note: in instantiation of member function 'lld::elf::ObjFile<llvm::object::ELFType<llvm::support::little, false> >::getVariableLoc' requested here
template class elf::ObjFile<ELF32LE>;
                    ^
/b/s/w/ir/k/llvm-project/llvm/include/llvm/ADT/StringRef.h:79:5: note: 'StringRef' has been explicitly marked deleted here
    StringRef(std::nullptr_t) = delete;
    ^
/b/s/w/ir/k/llvm-project/llvm/include/llvm/DebugInfo/DWARF/DWARFDebugLine.h:263:59: note: passing argument to parameter 'CompDir' here
    bool getFileNameByIndex(uint64_t FileIndex, StringRef CompDir,
                                                          ^
/b/s/w/ir/k/llvm-project/lld/ELF/InputFiles.cpp:323:28: error: conversion function from 'nullptr_t' to 'llvm::StringRef' invokes a deleted function
          it->second.file, nullptr,
                           ^~~~~~~
/b/s/w/ir/k/llvm-project/lld/ELF/InputFiles.cpp:1638:21: note: in instantiation of member function 'lld::elf::ObjFile<llvm::object::ELFType<llvm::support::big, false> >::getVariableLoc' requested here
template class elf::ObjFile<ELF32BE>;
                    ^
/b/s/w/ir/k/llvm-project/llvm/include/llvm/ADT/StringRef.h:79:5: note: 'StringRef' has been explicitly marked deleted here
    StringRef(std::nullptr_t) = delete;
    ^
/b/s/w/ir/k/llvm-project/llvm/include/llvm/DebugInfo/DWARF/DWARFDebugLine.h:263:59: note: passing argument to parameter 'CompDir' here
    bool getFileNameByIndex(uint64_t FileIndex, StringRef CompDir,
                                                          ^
/b/s/w/ir/k/llvm-project/lld/ELF/InputFiles.cpp:323:28: error: conversion function from 'nullptr_t' to 'llvm::StringRef' invokes a deleted function
          it->second.file, nullptr,
                           ^~~~~~~
/b/s/w/ir/k/llvm-project/lld/ELF/InputFiles.cpp:1639:21: note: in instantiation of member function 'lld::elf::ObjFile<llvm::object::ELFType<llvm::support::little, true> >::getVariableLoc' requested here
template class elf::ObjFile<ELF64LE>;
                    ^
/b/s/w/ir/k/llvm-project/llvm/include/llvm/ADT/StringRef.h:79:5: note: 'StringRef' has been explicitly marked deleted here
    StringRef(std::nullptr_t) = delete;
    ^
/b/s/w/ir/k/llvm-project/llvm/include/llvm/DebugInfo/DWARF/DWARFDebugLine.h:263:59: note: passing argument to parameter 'CompDir' here
    bool getFileNameByIndex(uint64_t FileIndex, StringRef CompDir,
                                                          ^
/b/s/w/ir/k/llvm-project/lld/ELF/InputFiles.cpp:323:28: error: conversion function from 'nullptr_t' to 'llvm::StringRef' invokes a deleted function
          it->second.file, nullptr,
                           ^~~~~~~
/b/s/w/ir/k/llvm-project/lld/ELF/InputFiles.cpp:1640:21: note: in instantiation of member function 'lld::elf::ObjFile<llvm::object::ELFType<llvm::support::big, true> >::getVariableLoc' requested here
template class elf::ObjFile<ELF64BE>;
                    ^
/b/s/w/ir/k/llvm-project/llvm/include/llvm/ADT/StringRef.h:79:5: note: 'StringRef' has been explicitly marked deleted here
    StringRef(std::nullptr_t) = delete;
    ^
/b/s/w/ir/k/llvm-project/llvm/include/llvm/DebugInfo/DWARF/DWARFDebugLine.h:263:59: note: passing argument to parameter 'CompDir' here
    bool getFileNameByIndex(uint64_t FileIndex, StringRef CompDir,
                                                          ^
4 errors generated.
Mon, Jul 15, 5:56 PM · Restricted Project, Restricted Project, debug-info
phosek added a comment to D64711: [LTO] Don't override relocation model stored in the module.
In D64711#1584916, @pcc wrote:

I'd like to understand the motivation behind this change a little better because the relaxation of the code model from PIC to static is technically an "optimization" that the linker should have license to perform and in fact is already performing in some ways (e.g. emitting addresses into the binary instead of RELATIVE/RELR relocations for statically known addresses).

Mon, Jul 15, 4:26 PM · Restricted Project

Sun, Jul 14

phosek created D64711: [LTO] Don't override relocation model stored in the module.
Sun, Jul 14, 5:44 PM · Restricted Project

Sat, Jul 13

phosek committed rG20d34eacf3f1: [CMake][Fuchsia] Define asan+noexcept multilib (authored by phosek).
[CMake][Fuchsia] Define asan+noexcept multilib
Sat, Jul 13, 1:10 AM
phosek committed rL365994: [CMake][Fuchsia] Define asan+noexcept multilib.
[CMake][Fuchsia] Define asan+noexcept multilib
Sat, Jul 13, 1:10 AM
phosek closed D64140: [CMake][Fuchsia] Define asan+noexcept multilib.
Sat, Jul 13, 1:09 AM · Restricted Project, Restricted Project

Fri, Jul 12

phosek committed rG1a6053ebc61c: Revert "[COFF] Add null check in case of symbols defined in LTO blobs" (authored by phosek).
Revert "[COFF] Add null check in case of symbols defined in LTO blobs"
Fri, Jul 12, 10:34 PM
phosek committed rL365990: Revert "[COFF] Add null check in case of symbols defined in LTO blobs".
Revert "[COFF] Add null check in case of symbols defined in LTO blobs"
Fri, Jul 12, 10:33 PM
phosek committed rG2e398f1895b9: [libcxxabi] Don't process exceptions in cxa_handlers when they're disabled (authored by phosek).
[libcxxabi] Don't process exceptions in cxa_handlers when they're disabled
Fri, Jul 12, 12:12 PM
phosek committed rL365944: [libcxxabi] Don't process exceptions in cxa_handlers when they're disabled.
[libcxxabi] Don't process exceptions in cxa_handlers when they're disabled
Fri, Jul 12, 12:11 PM
phosek closed D64191: [libcxxabi] Don't process exceptions in cxa_handlers when they're disabled.
Fri, Jul 12, 12:11 PM · Restricted Project

Thu, Jul 11

phosek committed rG803b994e9a4d: [CMake][Fuchsia] Use RelWithDebInfo to build runtimes (authored by phosek).
[CMake][Fuchsia] Use RelWithDebInfo to build runtimes
Thu, Jul 11, 4:50 PM
phosek committed rL365845: [CMake][Fuchsia] Use RelWithDebInfo to build runtimes.
[CMake][Fuchsia] Use RelWithDebInfo to build runtimes
Thu, Jul 11, 4:49 PM
phosek closed D64605: [CMake][Fuchsia] Use RelWithDebInfo to build runtimes.
Thu, Jul 11, 4:49 PM · Restricted Project, Restricted Project
phosek created D64605: [CMake][Fuchsia] Use RelWithDebInfo to build runtimes.
Thu, Jul 11, 4:29 PM · Restricted Project, Restricted Project
phosek committed rG6f8f1a7db7b2: [sancov] Ignore PC samples with value 0 (authored by phosek).
[sancov] Ignore PC samples with value 0
Thu, Jul 11, 4:01 PM
phosek committed rL365839: [sancov] Ignore PC samples with value 0.
[sancov] Ignore PC samples with value 0
Thu, Jul 11, 4:00 PM
phosek closed D63695: [sancov] Ignore PC samples with value 0.
Thu, Jul 11, 4:00 PM · Restricted Project
phosek abandoned D63830: [ASan] Make FlushUnneededASanShadowMemory a per-platform function.

This is no longer needed now that D64166 landed.

Thu, Jul 11, 4:00 PM · Restricted Project, Restricted Project
phosek closed D64547: [Driver] -noprofilelib flag.
Thu, Jul 11, 3:58 PM · Restricted Project, Restricted Project
phosek created D64603: [Target] Use IEEE quad format for long double on Fuchsia x86_64.
Thu, Jul 11, 3:50 PM · Restricted Project
phosek updated the diff for D64191: [libcxxabi] Don't process exceptions in cxa_handlers when they're disabled.

Done, I've updated the comment for the CMake option.

Thu, Jul 11, 2:35 PM · Restricted Project
phosek accepted D64579: [clang-shlib] Fix clang-shlib for PRIVATE dependencies.

While upgrading to newer CMake would be nice, I think it's unlikely that we could move all the way to 3.12 since that version was only released a year ago and still isn't available in most distributions, so this LGTM. Maybe leave a TODO that this should be revisited after we bump minimum CMake requirement to 3.12 or newer?

Thu, Jul 11, 12:10 PM · Restricted Project, Restricted Project
phosek committed rG08cb342afae1: [Driver] -noprofilelib flag (authored by phosek).
[Driver] -noprofilelib flag
Thu, Jul 11, 12:09 PM
phosek committed rL365808: [Driver] -noprofilelib flag.
[Driver] -noprofilelib flag
Thu, Jul 11, 12:09 PM
phosek committed rG274ad9c3717e: [ASan] Use __sanitizer_fill_shadow for FastPoisonShadow on Fuchsia (authored by phosek).
[ASan] Use __sanitizer_fill_shadow for FastPoisonShadow on Fuchsia
Thu, Jul 11, 12:31 AM
phosek committed rL365739: [ASan] Use __sanitizer_fill_shadow for FastPoisonShadow on Fuchsia.
[ASan] Use __sanitizer_fill_shadow for FastPoisonShadow on Fuchsia
Thu, Jul 11, 12:31 AM
phosek closed D64166: [ASan] Use __sanitizer_fill_shadow for FastPoisonShadow on Fuchsia.
Thu, Jul 11, 12:31 AM · Restricted Project, Restricted Project
phosek updated the diff for D64166: [ASan] Use __sanitizer_fill_shadow for FastPoisonShadow on Fuchsia.
Thu, Jul 11, 12:16 AM · Restricted Project, Restricted Project
phosek created D64547: [Driver] -noprofilelib flag.
Thu, Jul 11, 12:11 AM · Restricted Project, Restricted Project

Wed, Jul 10

phosek added a comment to D64191: [libcxxabi] Don't process exceptions in cxa_handlers when they're disabled.

@ldionne and @EricWF do you have any preference?

Wed, Jul 10, 6:28 PM · Restricted Project
phosek created D64532: [CMake] Support separate installation of InstrProfData.inc.
Wed, Jul 10, 2:42 PM · Restricted Project

Tue, Jul 9

phosek added a comment to D64045: [InstrProfiling] Put instrumentation into comdat group with function.

Do you have a functional test case to show what this patch is trying to accomplish/fix?

Tue, Jul 9, 7:46 PM · Restricted Project
phosek added inline comments to D64378: [libcxx] Use C11 thread API on Fuchsia.
Tue, Jul 9, 6:34 PM
phosek updated the diff for D64378: [libcxx] Use C11 thread API on Fuchsia.
Tue, Jul 9, 6:33 PM
phosek added a comment to D64191: [libcxxabi] Don't process exceptions in cxa_handlers when they're disabled.

The only thing iffy about this is that it's not 100% clear to me what _LIBCXXABI_NO_EXCEPTIONS mean. It could either mean (a) that libc++abi itself doesn't use exceptions in its implementation, or (b) that it doesn't provide support for exceptions in the runtime, or both (a) and (b).

It clearly means at least (a) from a quick grep, however it's not clear to me that it also means (b).

Tue, Jul 9, 4:24 PM · Restricted Project
phosek added a comment to D64092: [TSan] Improve handling of stack pointer mangling in {set,long}jmp, pt.8.

Our bots started failing with the following build error after this change landed:

/b/s/w/ir/k/llvm-project/compiler-rt/lib/tsan/rtl/tsan_platform_linux.cc:425:3: error: unknown type name 'jump_buf'; did you mean 'jmp_buf'?
  jump_buf env;
  ^~~~~~~~
  jmp_buf
/b/s/w/ir/k/cipd/linux-arm64/usr/include/setjmp.h:48:30: note: 'jmp_buf' declared here
typedef struct __jmp_buf_tag jmp_buf[1];
                             ^
/b/s/w/ir/k/llvm-project/compiler-rt/lib/tsan/rtl/tsan_platform_linux.cc:426:3: error: use of undeclared identifier 'REAL'
  REAL(setjmp)(env);
  ^
2 errors generated.

Is it possible to fix the issue or revert the change?

Tue, Jul 9, 11:41 AM · Restricted Project, Restricted Project

Mon, Jul 8

phosek accepted D64381: Update libc++ include path detection to use VFS on Linux.

LGTM

Mon, Jul 8, 5:24 PM · Restricted Project
phosek created D64378: [libcxx] Use C11 thread API on Fuchsia.
Mon, Jul 8, 4:12 PM
phosek added a comment to D64191: [libcxxabi] Don't process exceptions in cxa_handlers when they're disabled.

Ping?

Mon, Jul 8, 2:11 PM · Restricted Project
phosek added a comment to D63935: [llvm-ar][test] Increase llvm-ar test coverage.

The tools/llvm-ar/extract.test is failing on macOS:

******************** TEST 'LLVM :: tools/llvm-ar/extract.test' FAILED ********************
Script:
--
: 'RUN: at line 2';   rm -rf /b/s/w/ir/k/recipe_cleanup/clanglRrIXg/llvm_build_dir/test/tools/llvm-ar/Output/extract.test.tmp && mkdir -p /b/s/w/ir/k/recipe_cleanup/clanglRrIXg/llvm_build_dir/test/tools/llvm-ar/Output/extract.test.tmp/extracted/
: 'RUN: at line 5';   /b/s/w/ir/k/recipe_cleanup/clanglRrIXg/llvm_build_dir/bin/llvm-ar cr /b/s/w/ir/k/recipe_cleanup/clanglRrIXg/llvm_build_dir/test/tools/llvm-ar/Output/extract.test.tmp/empty.a
: 'RUN: at line 6';   /b/s/w/ir/k/recipe_cleanup/clanglRrIXg/llvm_build_dir/bin/llvm-ar x /b/s/w/ir/k/recipe_cleanup/clanglRrIXg/llvm_build_dir/test/tools/llvm-ar/Output/extract.test.tmp/empty.a 2>&1    | /b/s/w/ir/k/recipe_cleanup/clanglRrIXg/llvm_build_dir/bin/FileCheck --allow-empty /dev/null --implicit-check-not={{.}}
: 'RUN: at line 9';   echo filea > /b/s/w/ir/k/recipe_cleanup/clanglRrIXg/llvm_build_dir/test/tools/llvm-ar/Output/extract.test.tmp/a.txt
: 'RUN: at line 10';   echo fileb > /b/s/w/ir/k/recipe_cleanup/clanglRrIXg/llvm_build_dir/test/tools/llvm-ar/Output/extract.test.tmp/b.txt
: 'RUN: at line 11';   /b/s/w/ir/k/recipe_cleanup/clanglRrIXg/llvm_build_dir/bin/llvm-ar rc /b/s/w/ir/k/recipe_cleanup/clanglRrIXg/llvm_build_dir/test/tools/llvm-ar/Output/extract.test.tmp/archive.a /b/s/w/ir/k/recipe_cleanup/clanglRrIXg/llvm_build_dir/test/tools/llvm-ar/Output/extract.test.tmp/a.txt /b/s/w/ir/k/recipe_cleanup/clanglRrIXg/llvm_build_dir/test/tools/llvm-ar/Output/extract.test.tmp/b.txt
: 'RUN: at line 14';   cd /b/s/w/ir/k/recipe_cleanup/clanglRrIXg/llvm_build_dir/test/tools/llvm-ar/Output/extract.test.tmp/extracted && /b/s/w/ir/k/recipe_cleanup/clanglRrIXg/llvm_build_dir/bin/llvm-ar x /b/s/w/ir/k/recipe_cleanup/clanglRrIXg/llvm_build_dir/test/tools/llvm-ar/Output/extract.test.tmp/archive.a a.txt
: 'RUN: at line 15';   diff /b/s/w/ir/k/recipe_cleanup/clanglRrIXg/llvm_build_dir/test/tools/llvm-ar/Output/extract.test.tmp/a.txt /b/s/w/ir/k/recipe_cleanup/clanglRrIXg/llvm_build_dir/test/tools/llvm-ar/Output/extract.test.tmp/extracted/a.txt
: 'RUN: at line 18';   rm /b/s/w/ir/k/recipe_cleanup/clanglRrIXg/llvm_build_dir/test/tools/llvm-ar/Output/extract.test.tmp/extracted/a.txt
: 'RUN: at line 19';   cd /b/s/w/ir/k/recipe_cleanup/clanglRrIXg/llvm_build_dir/test/tools/llvm-ar/Output/extract.test.tmp/extracted && /b/s/w/ir/k/recipe_cleanup/clanglRrIXg/llvm_build_dir/bin/llvm-ar x /b/s/w/ir/k/recipe_cleanup/clanglRrIXg/llvm_build_dir/test/tools/llvm-ar/Output/extract.test.tmp/archive.a
: 'RUN: at line 20';   diff /b/s/w/ir/k/recipe_cleanup/clanglRrIXg/llvm_build_dir/test/tools/llvm-ar/Output/extract.test.tmp/a.txt /b/s/w/ir/k/recipe_cleanup/clanglRrIXg/llvm_build_dir/test/tools/llvm-ar/Output/extract.test.tmp/extracted/a.txt
: 'RUN: at line 21';   diff /b/s/w/ir/k/recipe_cleanup/clanglRrIXg/llvm_build_dir/test/tools/llvm-ar/Output/extract.test.tmp/b.txt /b/s/w/ir/k/recipe_cleanup/clanglRrIXg/llvm_build_dir/test/tools/llvm-ar/Output/extract.test.tmp/extracted/b.txt
--
Exit Code: 1
Mon, Jul 8, 12:36 PM · Restricted Project
phosek added a comment to D64297: [JSONCompilationDatabase] Strip distcc/ccache/gomacc wrappers from parsed commands..

Is distcc gcc.exe or gomacc gcc.exe possible?

The design of the compilation database/plugin model makes it pretty hard to add options.

Yes. It also lacks user settings. Downstream compile_commands.json consumers may provide their own command line option filtering mechanism that users can customize and add more compiler schedulers. For some tools, they probably don't want to see filtering applying on multiple layers, especially if the filtering mechanism done at the JSONCompilationDatabase layer may have false positives.

but a messy aspect of the nature of the ecosystem around compile_commands.json.

I'll appreciate it if you propose something to make cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=On ninja -t comdb etc more precise:)

Mon, Jul 8, 12:15 AM · Restricted Project

Sun, Jul 7

phosek committed rGe28fca29fefe: Revert "[IRBuilder] Fold consistently for or/and whether constant is LHS or RHS" (authored by phosek).
Revert "[IRBuilder] Fold consistently for or/and whether constant is LHS or RHS"
Sun, Jul 7, 3:14 PM
phosek committed rL365284: Revert "[IRBuilder] Fold consistently for or/and whether constant is LHS or RHS".
Revert "[IRBuilder] Fold consistently for or/and whether constant is LHS or RHS"
Sun, Jul 7, 3:14 PM

Thu, Jul 4

phosek added a comment to D62718: [llvm-objcopy] Change handling of output file permissions.

This broke tests:

FAIL: LLVM :: tools/llvm-objcopy/ELF/respect-umask.test (31512 of 32250)
******************** TEST 'LLVM :: tools/llvm-objcopy/ELF/respect-umask.test' FAILED ********************
Script:
--
: 'RUN: at line 8';   touch /b/s/w/ir/k/recipe_cleanup/clangz_eJan/llvm_build_dir/test/tools/llvm-objcopy/ELF/Output/respect-umask.test.tmp
: 'RUN: at line 9';   chmod 0755 /b/s/w/ir/k/recipe_cleanup/clangz_eJan/llvm_build_dir/test/tools/llvm-objcopy/ELF/Output/respect-umask.test.tmp
: 'RUN: at line 10';   ls -l /b/s/w/ir/k/recipe_cleanup/clangz_eJan/llvm_build_dir/test/tools/llvm-objcopy/ELF/Output/respect-umask.test.tmp | cut -f 1 -d ' ' > /b/s/w/ir/k/recipe_cleanup/clangz_eJan/llvm_build_dir/test/tools/llvm-objcopy/ELF/Output/respect-umask.test.tmp.0755
: 'RUN: at line 11';   chmod 0500 /b/s/w/ir/k/recipe_cleanup/clangz_eJan/llvm_build_dir/test/tools/llvm-objcopy/ELF/Output/respect-umask.test.tmp
: 'RUN: at line 12';   ls -l /b/s/w/ir/k/recipe_cleanup/clangz_eJan/llvm_build_dir/test/tools/llvm-objcopy/ELF/Output/respect-umask.test.tmp | cut -f 1 -d ' ' > /b/s/w/ir/k/recipe_cleanup/clangz_eJan/llvm_build_dir/test/tools/llvm-objcopy/ELF/Output/respect-umask.test.tmp.0500
: 'RUN: at line 13';   chmod 0555 /b/s/w/ir/k/recipe_cleanup/clangz_eJan/llvm_build_dir/test/tools/llvm-objcopy/ELF/Output/respect-umask.test.tmp
: 'RUN: at line 14';   ls -l /b/s/w/ir/k/recipe_cleanup/clangz_eJan/llvm_build_dir/test/tools/llvm-objcopy/ELF/Output/respect-umask.test.tmp | cut -f 1 -d ' ' > /b/s/w/ir/k/recipe_cleanup/clangz_eJan/llvm_build_dir/test/tools/llvm-objcopy/ELF/Output/respect-umask.test.tmp.0555
: 'RUN: at line 16';   /b/s/w/ir/k/recipe_cleanup/clangz_eJan/llvm_build_dir/bin/yaml2obj /b/s/w/ir/k/llvm-project/llvm/test/tools/llvm-objcopy/ELF/respect-umask.test -o /b/s/w/ir/k/recipe_cleanup/clangz_eJan/llvm_build_dir/test/tools/llvm-objcopy/ELF/Output/respect-umask.test.tmp
: 'RUN: at line 18';   umask 0022
: 'RUN: at line 19';   chmod 0777 /b/s/w/ir/k/recipe_cleanup/clangz_eJan/llvm_build_dir/test/tools/llvm-objcopy/ELF/Output/respect-umask.test.tmp
: 'RUN: at line 20';   /b/s/w/ir/k/recipe_cleanup/clangz_eJan/llvm_build_dir/bin/llvm-objcopy /b/s/w/ir/k/recipe_cleanup/clangz_eJan/llvm_build_dir/test/tools/llvm-objcopy/ELF/Output/respect-umask.test.tmp /b/s/w/ir/k/recipe_cleanup/clangz_eJan/llvm_build_dir/test/tools/llvm-objcopy/ELF/Output/respect-umask.test.tmp1
: 'RUN: at line 21';   ls -l /b/s/w/ir/k/recipe_cleanup/clangz_eJan/llvm_build_dir/test/tools/llvm-objcopy/ELF/Output/respect-umask.test.tmp1 | cut -f 1 -d ' ' > /b/s/w/ir/k/recipe_cleanup/clangz_eJan/llvm_build_dir/test/tools/llvm-objcopy/ELF/Output/respect-umask.test.tmp1.perms
: 'RUN: at line 22';   cmp /b/s/w/ir/k/recipe_cleanup/clangz_eJan/llvm_build_dir/test/tools/llvm-objcopy/ELF/Output/respect-umask.test.tmp1.perms /b/s/w/ir/k/recipe_cleanup/clangz_eJan/llvm_build_dir/test/tools/llvm-objcopy/ELF/Output/respect-umask.test.tmp.0755
: 'RUN: at line 24';   umask 0237
: 'RUN: at line 25';   chmod 0707 /b/s/w/ir/k/recipe_cleanup/clangz_eJan/llvm_build_dir/test/tools/llvm-objcopy/ELF/Output/respect-umask.test.tmp
: 'RUN: at line 26';   /b/s/w/ir/k/recipe_cleanup/clangz_eJan/llvm_build_dir/bin/llvm-objcopy /b/s/w/ir/k/recipe_cleanup/clangz_eJan/llvm_build_dir/test/tools/llvm-objcopy/ELF/Output/respect-umask.test.tmp /b/s/w/ir/k/recipe_cleanup/clangz_eJan/llvm_build_dir/test/tools/llvm-objcopy/ELF/Output/respect-umask.test.tmp1
: 'RUN: at line 27';   ls -l /b/s/w/ir/k/recipe_cleanup/clangz_eJan/llvm_build_dir/test/tools/llvm-objcopy/ELF/Output/respect-umask.test.tmp1 | cut -f 1 -d ' ' > /b/s/w/ir/k/recipe_cleanup/clangz_eJan/llvm_build_dir/test/tools/llvm-objcopy/ELF/Output/respect-umask.test.tmp1.perms
: 'RUN: at line 28';   cmp /b/s/w/ir/k/recipe_cleanup/clangz_eJan/llvm_build_dir/test/tools/llvm-objcopy/ELF/Output/respect-umask.test.tmp1.perms /b/s/w/ir/k/recipe_cleanup/clangz_eJan/llvm_build_dir/test/tools/llvm-objcopy/ELF/Output/respect-umask.test.tmp.0500
: 'RUN: at line 30';   umask 0222
: 'RUN: at line 31';   chmod 0777 /b/s/w/ir/k/recipe_cleanup/clangz_eJan/llvm_build_dir/test/tools/llvm-objcopy/ELF/Output/respect-umask.test.tmp
: 'RUN: at line 32';   /b/s/w/ir/k/recipe_cleanup/clangz_eJan/llvm_build_dir/bin/llvm-objcopy /b/s/w/ir/k/recipe_cleanup/clangz_eJan/llvm_build_dir/test/tools/llvm-objcopy/ELF/Output/respect-umask.test.tmp /b/s/w/ir/k/recipe_cleanup/clangz_eJan/llvm_build_dir/test/tools/llvm-objcopy/ELF/Output/respect-umask.test.tmp1
: 'RUN: at line 33';   ls -l /b/s/w/ir/k/recipe_cleanup/clangz_eJan/llvm_build_dir/test/tools/llvm-objcopy/ELF/Output/respect-umask.test.tmp1 | cut -f 1 -d ' ' > /b/s/w/ir/k/recipe_cleanup/clangz_eJan/llvm_build_dir/test/tools/llvm-objcopy/ELF/Output/respect-umask.test.tmp1.perms
: 'RUN: at line 34';   cmp /b/s/w/ir/k/recipe_cleanup/clangz_eJan/llvm_build_dir/test/tools/llvm-objcopy/ELF/Output/respect-umask.test.tmp1.perms /b/s/w/ir/k/recipe_cleanup/clangz_eJan/llvm_build_dir/test/tools/llvm-objcopy/ELF/Output/respect-umask.test.tmp.0555
--
Exit Code: 1
Thu, Jul 4, 9:57 PM · Restricted Project

Wed, Jul 3

phosek created D64191: [libcxxabi] Don't process exceptions in cxa_handlers when they're disabled.
Wed, Jul 3, 7:03 PM · Restricted Project
phosek added a comment to D64166: [ASan] Use __sanitizer_fill_shadow for FastPoisonShadow on Fuchsia.

Alternatively, I can move FastPoisonShadow implementation to asan_poisoning.cc and asan_fuchsia.cc and implement them separately for each platform, but we would loose the inlining if we do that.

Wed, Jul 3, 4:14 PM · Restricted Project, Restricted Project
phosek created D64166: [ASan] Use __sanitizer_fill_shadow for FastPoisonShadow on Fuchsia.
Wed, Jul 3, 4:11 PM · Restricted Project, Restricted Project
phosek created D64140: [CMake][Fuchsia] Define asan+noexcept multilib.
Wed, Jul 3, 10:12 AM · Restricted Project, Restricted Project

Tue, Jul 2

phosek updated the diff for D64045: [InstrProfiling] Put instrumentation into comdat group with function.
Tue, Jul 2, 5:58 PM · Restricted Project
phosek added inline comments to D64045: [InstrProfiling] Put instrumentation into comdat group with function.
Tue, Jul 2, 5:50 PM · Restricted Project
phosek updated the diff for D64045: [InstrProfiling] Put instrumentation into comdat group with function.
Tue, Jul 2, 5:47 PM · Restricted Project

Mon, Jul 1

phosek created D64045: [InstrProfiling] Put instrumentation into comdat group with function.
Mon, Jul 1, 3:58 PM · Restricted Project
phosek added a comment to D63948: [SLP] Limit compilation time of look-ahead operand reordering heuristic..

Do you think you'll be able to land this change today or shall I revert D60897? Our bots have been broken since Thursday and we don't have any test coverage for our toolchain as a consequence.

Mon, Jul 1, 11:44 AM · Restricted Project

Sat, Jun 29

phosek accepted D63695: [sancov] Ignore PC samples with value 0.

LGTM

Sat, Jun 29, 1:14 PM · Restricted Project

Fri, Jun 28

phosek added a comment to D63948: [SLP] Limit compilation time of look-ahead operand reordering heuristic..

I tried the updated version and the build successfully finished and the build times are back to normal. Thank you for looking into this so promptly. Is it possible to land this change?

Fri, Jun 28, 3:39 PM · Restricted Project
phosek added a comment to D63948: [SLP] Limit compilation time of look-ahead operand reordering heuristic..

I'm getting the following error with this change:

ld.lld: llvm-project/llvm/include/llvm/IR/User.h:170: llvm::Value *llvm::User::getOperand(unsigned int) const: Assertion `i < NumUserOperands && "getOperand() out of range!"' failed.
Fri, Jun 28, 1:46 PM · Restricted Project
phosek added a comment to D60897: [SLP] Look-ahead operand reordering heuristic..

I think There are two possible causes for the compilation time increase:

  1. Line 901 : We can restrict the number of operands to a max of 2
  2. Line 820: We can restrict the visited users to a ma x of 2. I can either create a quick patch, or I can revert it. Either is fine.
Fri, Jun 28, 11:13 AM · Restricted Project
phosek added a comment to D60897: [SLP] Look-ahead operand reordering heuristic..

This change has caused a massive increase in build times when using LTO. On my workstations when building Clang toolchain itself with LTO, the build time has increased from 50 minutes to 5+ hours. On our continuous builders, we seen timeouts everywhere because they aren't able to finish within the allocated time (5 hours). Would it be possible to revert this change?

Fri, Jun 28, 9:02 AM · Restricted Project

Thu, Jun 27

phosek committed rGd9a59aeb049e: [libFuzzer] Migrate to the new exception syscalls on Fuchsia (authored by phosek).
[libFuzzer] Migrate to the new exception syscalls on Fuchsia
Thu, Jun 27, 2:15 PM
phosek committed rG379a9f5e2406: [sanitizer_common] Switch from zx_clock_get_new to zx_clock_get (authored by phosek).
[sanitizer_common] Switch from zx_clock_get_new to zx_clock_get
Thu, Jun 27, 2:15 PM
phosek committed rL364594: [libFuzzer] Migrate to the new exception syscalls on Fuchsia.
[libFuzzer] Migrate to the new exception syscalls on Fuchsia
Thu, Jun 27, 2:15 PM
phosek committed rL364593: [sanitizer_common] Switch from zx_clock_get_new to zx_clock_get.
[sanitizer_common] Switch from zx_clock_get_new to zx_clock_get
Thu, Jun 27, 2:15 PM
phosek closed D63895: [sanitizer_common] Switch from zx_clock_get_new to zx_clock_get.
Thu, Jun 27, 2:15 PM · Restricted Project, Restricted Project
phosek closed D63897: [libFuzzer] Migrate to the new exception syscalls on Fuchsia.
Thu, Jun 27, 2:15 PM · Restricted Project, Restricted Project
phosek updated the diff for D63897: [libFuzzer] Migrate to the new exception syscalls on Fuchsia.
Thu, Jun 27, 2:08 PM · Restricted Project, Restricted Project
phosek created D63897: [libFuzzer] Migrate to the new exception syscalls on Fuchsia.
Thu, Jun 27, 1:51 PM · Restricted Project, Restricted Project
phosek created D63895: [sanitizer_common] Switch from zx_clock_get_new to zx_clock_get.
Thu, Jun 27, 1:47 PM · Restricted Project, Restricted Project

Wed, Jun 26

phosek created D63830: [ASan] Make FlushUnneededASanShadowMemory a per-platform function.
Wed, Jun 26, 11:04 AM · Restricted Project, Restricted Project

Mon, Jun 24

phosek added a comment to D59225: [profile] Support for GCDA profiling in Fuchsia.

I'd like to split the platform specific aspects to separate files, e.g. GCDAProfilingPlatformUnix.c, GCDAProfilingPlatformWindows.c and GCDAProfilingPlatformFuchsia.c as suggested by @davidxl, but I'd rather do it in a follow up change.

Mon, Jun 24, 11:41 AM · Restricted Project, Restricted Project

Sun, Jun 23

phosek committed rGc6094f0495bf: [GN] Generation failure caused by trailing space in file name (authored by phosek).
[GN] Generation failure caused by trailing space in file name
Sun, Jun 23, 4:13 PM
phosek committed rL364162: [GN] Generation failure caused by trailing space in file name.
[GN] Generation failure caused by trailing space in file name
Sun, Jun 23, 4:13 PM
phosek closed D63449: [GN] Generation failure caused by trailing space in file name.
Sun, Jun 23, 4:13 PM · Restricted Project

Jun 21 2019

phosek updated the diff for D59225: [profile] Support for GCDA profiling in Fuchsia.
Jun 21 2019, 4:26 PM · Restricted Project, Restricted Project

Jun 19 2019

phosek added a comment to D28462: clang-format: Add new style option AlignConsecutiveMacros.

Would it be possible to land this change? Do you need help with landing it? We've been waiting for this for a long time and we would like to start using it now that it has been accepted.

Jun 19 2019, 3:39 PM · Restricted Project, Restricted Project
phosek added a comment to D63190: Add -gnu-map option to emit a map file in the GNU-tsyle format..

Yes, we have an internal user who has a proprietary tool to process a -Map output. As to the difference between bfd and gold, they don't look too big, so perhaps most tools can consume both. In this output, I modeled gold.

I think it isn't likely that tools will accept both gold and bfd map file formats; from a conversation with an employee of a Linux Distro, gold was used about 3% of the time although I expect its use to be significantly higher in Google. I've seen map file post processing most used in embedded systems as this is where placement of sections and size information is most crucial. I think most of those users are with ld.bfd at the moment though.

At the Euro LLVM binutils (LLD as honorary member) it was suggested that a machine readable format option for outputs such as the map file would be ideal. There was some belief that binutils could be persuaded to adopt a similar format. The TI proprietary linker does this http://downloads.ti.com/docs/esd/SLAU131K/Content/SLAU131K_HTML/xml_link_information_file_description.html#STDZ0820750 although they use XML which is probably overkill. Something like JSON would be quite simple for tools to parse.

Would it be worth asking if the customer would be willing to rewrite their parser to consume something like JSON and go down that route? Having said all that I've no objections to adding support for other linker map file formats, and adding gold doesn't prevent adding others later.

Jun 19 2019, 3:11 PM · Restricted Project

Jun 17 2019

phosek accepted D63449: [GN] Generation failure caused by trailing space in file name.

LGTM

Jun 17 2019, 2:52 PM · Restricted Project

Jun 16 2019

phosek added inline comments to D63179: [sanitizer-common] Reduce ANSI color sequences that have no effect..
Jun 16 2019, 10:19 PM · Restricted Project, Restricted Project

Jun 14 2019

phosek accepted D63210: gn build: Add NVPTX target.

Since you always include all three of //llvm/lib/Target/targets.gni, //llvm/lib/Target/targets_with_asm_parsers.gni, //llvm/lib/Target/targets_with_disassemblers.gni, why not just combine all of them into //llvm/lib/Target/targets.gni? If we ever need them separately and performance becomes an issue, we can split them later.

Jun 14 2019, 10:45 AM · Restricted Project
phosek accepted D63200: gn build: Simplify Target build files.

LGTM

Jun 14 2019, 10:42 AM · Restricted Project

Jun 13 2019

phosek added a comment to D61697: [lit] Disable test on darwin when building shared libs..

This broke all our macOS builders:

llvm-lit: /b/s/w/ir/k/llvm-project/llvm/utils/lit/lit/TestingConfig.py:102: fatal: unable to parse config file '/b/s/w/ir/k/recipe_cleanup/clangh7IvHV/llvm_build_dir/tools/lld/test/lit.site.cfg.py', traceback: Traceback (most recent call last):
  File "/b/s/w/ir/k/llvm-project/llvm/utils/lit/lit/TestingConfig.py", line 89, in load_from_path
    exec(compile(data, path, 'exec'), cfg_globals, None)
  File "/b/s/w/ir/k/recipe_cleanup/clangh7IvHV/llvm_build_dir/tools/lld/test/lit.site.cfg.py", line 31, in <module>
    lit.llvm.initialize(lit_config, config)
  File "/b/s/w/ir/k/llvm-project/llvm/utils/lit/lit/llvm/__init__.py", line 9, in initialize
    llvm_config = config.LLVMConfig(lit_config, test_config)
  File "/b/s/w/ir/k/llvm-project/llvm/utils/lit/lit/llvm/config.py", line 51, in __init__
    if config.enable_shared:
AttributeError: TestingConfig instance has no attribute 'enable_shared'

The problem is that enable_shared isn't defined in lld's lit.site.cfg.py. Is it possible to either fix this or revert this change?

Jun 13 2019, 4:56 PM · Restricted Project, Restricted Project

Jun 12 2019

phosek planned changes to D63092: [Frontend] Use executable path when creating invocation from cmdline.
Jun 12 2019, 12:14 AM · Restricted Project

Jun 11 2019

phosek added a reviewer for D63179: [sanitizer-common] Reduce ANSI color sequences that have no effect.: phosek.
Jun 11 2019, 5:24 PM · Restricted Project, Restricted Project

Jun 10 2019

phosek accepted D63107: Setup testing target dependencies for default runtimes.

LGTM

Jun 10 2019, 5:08 PM · Restricted Project