Issue metadata
Sign in to add a comment
|
platform_ToolchainOptions failing with llvm-next |
||||||||||||||||||||||
Issue descriptionStarting around Dec. 15. all of the llvm-next-toolchain builders have started failing the platform_ToolchainOptions test in the security test suite. In particular, the "Stack Execution" test is failing, because the "GNU STACK" section of that file is being built "RWE" (executable) rather than just "RW" /usr/lib64/libgcrypt.so.20.0.3. An example: $ readelf -lW libgcrypt.so.20.0.3 Elf file type is DYN (Shared object file) Entry point 0x0 There are 8 program headers, starting at offset 64 Program Headers: Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align PHDR 0x000040 0x0000000000000040 0x0000000000000040 0x0001c0 0x0001c0 R 0x8 LOAD 0x000000 0x0000000000000000 0x0000000000000000 0x0ce988 0x0ce988 R E 0x1000 LOAD 0x0cefb0 0x00000000000cffb0 0x00000000000cffb0 0x007ff8 0x008460 RW 0x1000 DYNAMIC 0x0cfad8 0x00000000000d0ad8 0x00000000000d0ad8 0x000220 0x000220 RW 0x8 NOTE 0x000200 0x0000000000000200 0x0000000000000200 0x000024 0x000024 R 0x4 GNU_EH_FRAME 0x0ce974 0x00000000000ce974 0x00000000000ce974 0x000014 0x000014 R 0x4 GNU_STACK 0x000000 0x0000000000000000 0x0000000000000000 0x000000 0x000000 RWE 0x10 GNU_RELRO 0x0cefb0 0x00000000000cffb0 0x00000000000cffb0 0x001050 0x001050 RW 0x10 Section to Segment mapping: Segment Sections... 00 01 .note.gnu.build-id .dynsym .dynstr .gnu.hash .gnu.version .gnu.version_d .gnu.version_r .rela.dyn .relr.dyn .rela.plt .init .plt .text .fini .rodata .eh_frame .eh_frame_hdr 02 .ctors .dtors .jcr .data.rel.ro .dynamic .got .got.plt .data .bss 03 .dynamic 04 .note.gnu.build-id 05 .eh_frame_hdr 06 07 .ctors .dtors .jcr .data.rel.ro .dynamic .got .got.plt (from gs://chromeos-image-archive/snappy-llvm-next-toolchain-tryjob/R73-11426.0.0-b3245613/chromiumos_test_image.tar.xz) Previously, the stack was just "RW". Here's an example from an older build: $ readelf -lW libgcrypt.so.20.0.3 Elf file type is DYN (Shared object file) Entry point 0x0 There are 8 program headers, starting at offset 64 Program Headers: Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align PHDR 0x000040 0x0000000000000040 0x0000000000000040 0x0001c0 0x0001c0 R 0x8 LOAD 0x000000 0x0000000000000000 0x0000000000000000 0x0ced98 0x0ced98 R E 0x1000 LOAD 0x0cefb0 0x00000000000cffb0 0x00000000000cffb0 0x007ff8 0x008460 RW 0x1000 DYNAMIC 0x0cfad8 0x00000000000d0ad8 0x00000000000d0ad8 0x000220 0x000220 RW 0x8 NOTE 0x000200 0x0000000000000200 0x0000000000000200 0x000024 0x000024 R 0x4 GNU_EH_FRAME 0x0ced84 0x00000000000ced84 0x00000000000ced84 0x000014 0x000014 R 0x4 GNU_STACK 0x000000 0x0000000000000000 0x0000000000000000 0x000000 0x000000 RW 0x10 GNU_RELRO 0x0cefb0 0x00000000000cffb0 0x00000000000cffb0 0x001050 0x001050 RW 0x10 Section to Segment mapping: Segment Sections... 00 01 .note.gnu.build-id .dynsym .dynstr .gnu.hash .gnu.version .gnu.version_d .gnu.version_r .rela.dyn .relr.dyn .rela.plt .init .plt .text .fini .rodata .eh_frame .eh_frame_hdr 02 .ctors .dtors .jcr .data.rel.ro .dynamic .got .got.plt .data .bss 03 .dynamic 04 .note.gnu.build-id 05 .eh_frame_hdr 06 07 .ctors .dtors .jcr .data.rel.ro .dynamic .got .got.plt
,
Dec 19
Glad there is a test for this!
,
Dec 20
Clang is actually crashing for this test: armv7a-cros-linux-gnueabihf-clang -O2 -pipe -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=hard -g -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables -Wa,--noexecstack -c -o conftest.o conftest.s --sysroot=/build/whirlwind -v Chromium OS 8.0_pre339409_p20180926-r8 clang version 8.0.0 (/var/cache/chromeos-cache/distfiles/host/egit-src/clang.git 33834d33328b04607147a0352b67da76b85029bf) (/var/cache/chromeos-cache/distfiles/host/egit-src/llvm.git 5e1b99cf3b50e2d013904a4ecc096cee77d91b86) (based on LLVM 8.0.0svn) Target: armv7a-cros-linux-gnueabihf Thread model: posix InstalledDir: /usr/bin Found candidate GCC installation: /usr/bin/../lib/gcc/armv7a-cros-linux-gnueabihf/4.9.x Selected GCC installation: /usr/bin/../lib/gcc/armv7a-cros-linux-gnueabihf/4.9.x Candidate multilib: .;@m32 Selected multilib: .;@m32 "/usr/bin/clang-8" -cc1as -triple armv7-cros-linux-gnueabihf -filetype obj -main-file-name conftest.s -target-cpu generic -target-feature -fp-only-sp -target-feature +d16 -target-feature +vfp3 -target-feature -fp16 -target-feature -vfp4 -target-feature -fp-armv8 -target-feature -neon -target-feature -crypto -fdebug-compilation-dir /tmp -dwarf-debug-producer Chromium OS 8.0_pre339409_p20180926-r8 clang version 8.0.0 (/var/cache/chromeos-cache/distfiles/host/egit-src/clang.git 33834d33328b04607147a0352b67da76b85029bf) (/var/cache/chromeos-cache/distfiles/host/egit-src/llvm.git 5e1b99cf3b50e2d013904a4ecc096cee77d91b86) (based on LLVM 8.0.0svn) -debug-info-kind=limited -dwarf-version=4 -mrelocation-model pic -mllvm -arm-add-build-attributes -mnoexecstack -o conftest.o conftest.s clang-8: /var/tmp/portage/sys-devel/llvm-8.0_pre339409_p20180926-r8/work/llvm-8.0_pre339409_p20180926/include/llvm/MC/MCDwarf.h:316: void llvm::MCDwarfLineTable::resetRootFile(): Assertion `Header.MCDwarfFiles.empty()' failed. Stack dump: 0. Program arguments: /usr/bin/clang-8 -cc1as -triple armv7-cros-linux-gnueabihf -filetype obj -main-file-name conftest.s -target-cpu generic -target-feature -fp-only-sp -target-feature +d16 -target-feature +vfp3 -target-feature -fp16 -target-feature -vfp4 -target-feature -fp-armv8 -target-feature -neon -target-feature -crypto -fdebug-compilation-dir /tmp -dwarf-debug-producer Chromium OS 8.0_pre339409_p20180926-r8 clang version 8.0.0 (/var/cache/chromeos-cache/distfiles/host/egit-src/clang.git 33834d33328b04607147a0352b67da76b85029bf) (/var/cache/chromeos-cache/distfiles/host/egit-src/llvm.git 5e1b99cf3b50e2d013904a4ecc096cee77d91b86) (based on LLVM 8.0.0svn) -debug-info-kind=limited -dwarf-version=4 -mrelocation-model pic -mllvm -arm-add-build-attributes -mnoexecstack -o conftest.o conftest.s #0 0x00007f76698b63af llvm::sys::PrintStackTrace(llvm::raw_ostream&) (/usr/bin/../lib64/libLLVM-8svn.so+0xaa13af) #1 0x00007f76698b41f0 llvm::sys::RunSignalHandlers() (/usr/bin/../lib64/libLLVM-8svn.so+0xa9f1f0) #2 0x00007f76698b66c8 (/usr/bin/../lib64/libLLVM-8svn.so+0xaa16c8) #3 0x00007f766823ad70 (/lib64/libc.so.6+0x35d70) #4 0x00007f766823acf1 gsignal (/lib64/libc.so.6+0x35cf1) #5 0x00007f766823ca01 abort (/lib64/libc.so.6+0x37a01) #6 0x00007f76682333f7 (/lib64/libc.so.6+0x2e3f7) #7 0x00007f76682334a2 (/lib64/libc.so.6+0x2e4a2) #8 0x00007f766aa99054 (/usr/bin/../lib64/libLLVM-8svn.so+0x1c84054) #9 0x00007f766aa8a169 (/usr/bin/../lib64/libLLVM-8svn.so+0x1c75169) #10 0x000000000063007c cc1as_main(llvm::ArrayRef<char const*>, char const*, void*) (/usr/bin/clang-8+0x63007c) #11 0x00000000006291ac main (/usr/bin/clang-8+0x6291ac) #12 0x00007f7668226a4e __libc_start_main (/lib64/libc.so.6+0x21a4e) #13 0x00000000006262ba _start (/usr/bin/clang-8+0x6262ba) clang-8: error: unable to execute command: Aborted clang-8: error: clang integrated assembler command failed due to signal (use -v to see invocation) Chromium OS 8.0_pre339409_p20180926-r8 clang version 8.0.0 (/var/cache/chromeos-cache/distfiles/host/egit-src/clang.git 33834d33328b04607147a0352b67da76b85029bf) (/var/cache/chromeos-cache/distfiles/host/egit-src/llvm.git 5e1b99cf3b50e2d013904a4ecc096cee77d91b86) (based on LLVM 8.0.0svn) Target: armv7a-cros-linux-gnueabihf Thread model: posix InstalledDir: /usr/bin clang-8: note: diagnostic msg: PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace, preprocessed source, and associated run script. clang-8: note: diagnostic msg: Error generating preprocessed source(s) - no preprocessable inputs.
,
Dec 21
Opened https://bugs.llvm.org/show_bug.cgi?id=40126 which was duped to https://bugs.llvm.org/show_bug.cgi?id=38994
,
Dec 22
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/63c04402c7ad671cd16d8d409d66795c38cbdf37 commit 63c04402c7ad671cd16d8d409d66795c38cbdf37 Author: Manoj Gupta <manojgupta@google.com> Date: Sat Dec 22 22:29:21 2018 llvm-next: Update to r346485 BUG= chromium:907164 BUG= chromium:916740 TEST=USE=llvm-next sudo emerge llvm works locally and in chromiumos-sdk. TEST= Change-Id: I788b1c8ea86d60b4f71b63ee86c47d6a678bfeeb Reviewed-on: https://chromium-review.googlesource.com/c/1345469 Reviewed-by: Caroline Tice <cmtice@chromium.org> Trybot-Ready: Manoj Gupta <manojgupta@chromium.org> Tested-by: Manoj Gupta <manojgupta@chromium.org> Commit-Queue: Manoj Gupta <manojgupta@chromium.org> [rename] https://crrev.com/63c04402c7ad671cd16d8d409d66795c38cbdf37/sys-devel/lld/lld-8.0_pre339409-r4.ebuild [modify] https://crrev.com/63c04402c7ad671cd16d8d409d66795c38cbdf37/sys-devel/llvm/llvm-8.0_pre339409_p20180926.ebuild [modify] https://crrev.com/63c04402c7ad671cd16d8d409d66795c38cbdf37/sys-devel/lld/lld-8.0_pre339409.ebuild [add] https://crrev.com/63c04402c7ad671cd16d8d409d66795c38cbdf37/sys-devel/llvm/files/cherry/87b8537d3eb21a2afa0ef8673de958ed46ca4af0.patch [add] https://crrev.com/63c04402c7ad671cd16d8d409d66795c38cbdf37/sys-devel/llvm/files/cherry/5f524f5f6513ccfb489f3a9d3874d767ad05d30b.patch [add] https://crrev.com/63c04402c7ad671cd16d8d409d66795c38cbdf37/sys-devel/llvm/files/llvm-8.0-revert-headers-as-sources.patch [modify] https://crrev.com/63c04402c7ad671cd16d8d409d66795c38cbdf37/sys-libs/compiler-rt/compiler-rt-8.0_pre339409.ebuild [add] https://crrev.com/63c04402c7ad671cd16d8d409d66795c38cbdf37/sys-devel/llvm/files/cherry/c8c80b0f2f4fecead57d6bfdb6afd894c59361cc.patch [add] https://crrev.com/63c04402c7ad671cd16d8d409d66795c38cbdf37/sys-devel/llvm/files/llvm-8.0-next-revert-afdo-hotness.patch [add] https://crrev.com/63c04402c7ad671cd16d8d409d66795c38cbdf37/sys-devel/llvm/files/llvm-8.0-revert-asm-debug-info.patch [add] https://crrev.com/63c04402c7ad671cd16d8d409d66795c38cbdf37/sys-devel/llvm/files/cherry/0fca1c8158c411ed6e99c05f53e5d1daad83c261.patch [add] https://crrev.com/63c04402c7ad671cd16d8d409d66795c38cbdf37/sys-devel/llvm/files/cherry/2e4508a5ad3bc515c11ac770da71239906dc88c0.patch [rename] https://crrev.com/63c04402c7ad671cd16d8d409d66795c38cbdf37/sys-libs/compiler-rt/compiler-rt-8.0_pre339409-r3.ebuild [add] https://crrev.com/63c04402c7ad671cd16d8d409d66795c38cbdf37/sys-devel/llvm/files/cherry/c3f9ab51440d34cbe3e113ae40c847f380a96845.patch [add] https://crrev.com/63c04402c7ad671cd16d8d409d66795c38cbdf37/sys-devel/llvm/files/clang-next-8.0-revert-r335284.patch [add] https://crrev.com/63c04402c7ad671cd16d8d409d66795c38cbdf37/sys-devel/llvm/files/cherry/c5dba22c1dbe70b0248125dfcb0b68406475f6c4.patch [add] https://crrev.com/63c04402c7ad671cd16d8d409d66795c38cbdf37/sys-devel/llvm/files/cherry/7e12b9765a105da269d3e41f2edc62ccdf7a4c35.patch [rename] https://crrev.com/63c04402c7ad671cd16d8d409d66795c38cbdf37/sys-devel/llvm/llvm-8.0_pre339409_p20180926-r8.ebuild [add] https://crrev.com/63c04402c7ad671cd16d8d409d66795c38cbdf37/sys-devel/llvm/files/cherry/3982fbc2ec44b6ba069d880e73db7bc248bbace4.patch [rename] https://crrev.com/63c04402c7ad671cd16d8d409d66795c38cbdf37/sys-libs/llvm-libunwind/llvm-libunwind-8.0_pre339409-r2.ebuild [add] https://crrev.com/63c04402c7ad671cd16d8d409d66795c38cbdf37/sys-devel/llvm/files/llvm-8.0-clang-executable-detection.patch [add] https://crrev.com/63c04402c7ad671cd16d8d409d66795c38cbdf37/sys-devel/llvm/files/cherry/e7ed3c458ebaac2f62761c6c44ee044a75cad925.patch [modify] https://crrev.com/63c04402c7ad671cd16d8d409d66795c38cbdf37/sys-libs/llvm-libunwind/llvm-libunwind-8.0_pre339409.ebuild
,
Dec 24
|
|||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||
Comment 1 by manojgupta@chromium.org
, Dec 19