Issue metadata
Sign in to add a comment
|
Chrome failing to build with CFI (--latest-toolchain builds) |
||||||||||||||||||||||||
Issue descriptionToolchain builds are failing to build Chrome with CFI on x86. https://cros-goldeneye.corp.google.com/chromeos/healthmonitoring/buildDetails?buildbucketId=8943850191198929200 https://cros-goldeneye.corp.google.com/chromeos/healthmonitoring/buildDetails?buildbucketId=8943849876616080496 chromeos-chrome-69.0.3456.0_rc-r1: [628/15032] LINK ./ozone_gl_unittests[K chromeos-chrome-69.0.3456.0_rc-r1: FAILED: ozone_gl_unittests chromeos-chrome-69.0.3456.0_rc-r1: python "../../../../../../../home/chrome-bot/chrome_root/src/build/toolchain/gcc_link_wrapper.py" --output="./ozone_gl_unittests" -- x86_64-cros-linux-gnu-clang++ -B/usr/x86_64-pc-linux-gnu/x86_64-cros-linux-gnu/binutils-bin/2.27.0-gold -Wl,--fatal-warnings -Wl,--build-id=sha1 -fPIC -Wl,-z,noexecstack -Wl,-z,now -Wl,-z,relro -Wl,-z,defs -Wl,--as-needed -fuse-ld=gold -B../../../../../../../home/chrome-bot/chrome_root/src/third_party/binutils/Linux_x64/Release/bin -Wl,--icf=all -flto=thin -Wl,-plugin-opt,jobs=8 -fwhole-program-vtables -m64 -Wl,-O2 -Wl,--gc-sections -Wl,--gdb-index --sysroot=../../../../../../../build/lulu -L../../../../../../../build/lulu/lib64 -Wl,-rpath-link=../../../../../../../build/lulu/lib64 -L../../../../../../../build/lulu/usr/lib64 -Wl,-rpath-link=../../../../../../../build/lulu/usr/lib64 -L../../../../../../../build/lulu/usr/local/lib64 -Wl,-rpath-link=../../../../../../../build/lulu/usr/local/lib64 -L../../../../../../../build/lulu/lib -Wl,-rpath-link=../../../../../../../build/lulu/lib -L../../../../../../../build/lulu/usr/lib -Wl,-rpath-link=../../../../../../../build/lulu/usr/lib -L../../../../../../../build/lulu/usr/local/lib -Wl,-rpath-link=../../../../../../../build/lulu/usr/local/lib -L../../../../../../../build/lulu/usr/x86_64-cros-linux-gnu/lib -Wl,-rpath-link=../../../../../../../build/lulu/usr/x86_64-cros-linux-gnu/lib -fsanitize=cfi-vcall -fsanitize=cfi-derived-cast -fsanitize=cfi-unrelated-cast -Wl,-rpath-link=. -Wl,--disable-new-dtags -L/build/lulu/usr/lib64 -L/build/lulu/usr/lib -Wl,-O1 -Wl,-O2 -Wl,--as-needed -stdlib=libc++ -Wl,-plugin-opt,-import-instr-limit=30 -o "./ozone_gl_unittests" -Wl,--start-group @"./ozone_gl_unittests.rsp" -Wl,--end-group -ldl -lpthread -lrt -lfontconfig -lexpat -ldrm -lsync -lsmime3 -lnss3 -lnssutil3 -lplds4 -lplc4 -lnspr4 -lxkbcommon -ldbus-1 -lresolv -lgestures -levdev -lgbm chromeos-chrome-69.0.3456.0_rc-r1: *** Inconsistent CFA register and/or offset between pred and succ *** chromeos-chrome-69.0.3456.0_rc-r1: Pred: outgoing CFA Reg:6 chromeos-chrome-69.0.3456.0_rc-r1: Pred: outgoing CFA Offset:16 chromeos-chrome-69.0.3456.0_rc-r1: Succ: incoming CFA Reg:7 chromeos-chrome-69.0.3456.0_rc-r1: Succ: incoming CFA Offset:8 chromeos-chrome-69.0.3456.0_rc-r1: LLVM ERROR: Found 1 in/out CFI information errors. chromeos-chrome-69.0.3456.0_rc-r1: clang-7: error: linker command failed with exit code 1 (use -v to see invocation) chromeos-chrome-69.0.3456.0_rc-r1: chromeos-chrome-69.0.3456.0_rc-r1: [629/15032] STAMP irt_x64/obj/mojo/public/interfaces/bindings/mojo_mojom_bindings_shared.stamp[K chromeos-chrome-69.0.3456.0_rc-r1: [630/15032] CXX irt_x64/obj/third_party/protobuf/protobuf_lite/stringpiece.o[K chromeos-chrome-69.0.3456.0_rc-r1: [631/15032] CXX irt_x64/obj/third_party/protobuf/protobuf_lite/time.o[K chromeos-chrome-69.0.3456.0_rc-r1: [632/15032] CXX irt_x64/obj/third_party/protobuf/protobuf_lite/arena.o[K chromeos-chrome-69.0.3456.0_rc-r1: [633/15032] CXX irt_x64/obj/third_party/protobuf/protobuf_lite/bytestream.o[K chromeos-chrome-69.0.3456.0_rc-r1: [634/15032] CXX irt_x64/obj/third_party/protobuf/protobuf_lite/zero_copy_stream.o[K chromeos-chrome-69.0.3456.0_rc-r1: [635/15032] AR irt_x64/obj/third_party/icu/libicuuc.a[K chromeos-chrome-69.0.3456.0_rc-r1: [636/15032] CXX irt_x64/obj/ui/gfx/memory_buffer_sources/gpu_fence.o[K chromeos-chrome-69.0.3456.0_rc-r1: [637/15032] CXX irt_x64/obj/ui/gfx/memory_buffer_sources/client_native_pixmap_factory.o[K chromeos-chrome-69.0.3456.0_rc-r1: [638/15032] CXX irt_x64/obj/third_party/protobuf/protobuf_lite/repeated_field.o[K chromeos-chrome-69.0.3456.0_rc-r1: [639/15032] CXX irt_x64/obj/third_party/protobuf/protobuf_lite/message_lite.o[K chromeos-chrome-69.0.3456.0_rc-r1: [640/15032] CXX irt_x64/obj/third_party/protobuf/protobuf_lite/coded_stream.o[K chromeos-chrome-69.0.3456.0_rc-r1: [641/15032] CXX irt_x64/obj/third_party/protobuf/protobuf_lite/zero_copy_stream_impl_lite.o[K chromeos-chrome-69.0.3456.0_rc-r1: [642/15032] CXX irt_x64/obj/ui/gfx/memory_buffer_sources/gpu_fence_handle.o[K chromeos-chrome-69.0.3456.0_rc-r1: [643/15032] CXX irt_x64/obj/ui/gfx/memory_buffer_sources/buffer_format_util.o[K chromeos-chrome-69.0.3456.0_rc-r1: [644/15032] LINK ./video_decode_accelerator_unittest[K chromeos-chrome-69.0.3456.0_rc-r1: FAILED: video_decode_accelerator_unittest chromeos-chrome-69.0.3456.0_rc-r1: python "../../../../../../../home/chrome-bot/chrome_root/src/build/toolchain/gcc_link_wrapper.py" --output="./video_decode_accelerator_unittest" -- x86_64-cros-linux-gnu-clang++ -B/usr/x86_64-pc-linux-gnu/x86_64-cros-linux-gnu/binutils-bin/2.27.0-gold -Wl,--fatal-warnings -Wl,--build-id=sha1 -fPIC -Wl,-z,noexecstack -Wl,-z,now -Wl,-z,relro -Wl,-z,defs -Wl,--as-needed -fuse-ld=gold -B../../../../../../../home/chrome-bot/chrome_root/src/third_party/binutils/Linux_x64/Release/bin -Wl,--icf=all -flto=thin -Wl,-plugin-opt,jobs=8 -fwhole-program-vtables -m64 -Wl,-O2 -Wl,--gc-sections -Wl,--gdb-index --sysroot=../../../../../../../build/lulu -L../../../../../../../build/lulu/lib64 -Wl,-rpath-link=../../../../../../../build/lulu/lib64 -L../../../../../../../build/lulu/usr/lib64 -Wl,-rpath-link=../../../../../../../build/lulu/usr/lib64 -L../../../../../../../build/lulu/usr/local/lib64 -Wl,-rpath-link=../../../../../../../build/lulu/usr/local/lib64 -L../../../../../../../build/lulu/lib -Wl,-rpath-link=../../../../../../../build/lulu/lib -L../../../../../../../build/lulu/usr/lib -Wl,-rpath-link=../../../../../../../build/lulu/usr/lib -L../../../../../../../build/lulu/usr/local/lib -Wl,-rpath-link=../../../../../../../build/lulu/usr/local/lib -L../../../../../../../build/lulu/usr/x86_64-cros-linux-gnu/lib -Wl,-rpath-link=../../../../../../../build/lulu/usr/x86_64-cros-linux-gnu/lib -fsanitize=cfi-vcall -fsanitize=cfi-derived-cast -fsanitize=cfi-unrelated-cast -Wl,-rpath-link=. -Wl,--disable-new-dtags -L/build/lulu/usr/lib64 -L/build/lulu/usr/lib -Wl,-O1 -Wl,-O2 -Wl,--as-needed -stdlib=libc++ -Wl,-plugin-opt,-import-instr-limit=30 -o "./video_decode_accelerator_unittest" -Wl,--start-group @"./video_decode_accelerator_unittest.rsp" -Wl,--end-group -ldl -lpthread -lrt -lsmime3 -lnss3 -lnssutil3 -lplds4 -lplc4 -lnspr4 -lasound -lcras -ldbus-1 -lexpat -lfontconfig -ldrm -lsync -lm -lz -lresolv -lEGL -lGLESv2 -lxkbcommon -lgestures -levdev -lgbm -lpci chromeos-chrome-69.0.3456.0_rc-r1: *** Inconsistent CFA register and/or offset between pred and succ *** chromeos-chrome-69.0.3456.0_rc-r1: Pred: outgoing CFA Reg:6 chromeos-chrome-69.0.3456.0_rc-r1: Pred: outgoing CFA Offset:16 chromeos-chrome-69.0.3456.0_rc-r1: Succ: incoming CFA Reg:7 chromeos-chrome-69.0.3456.0_rc-r1: Succ: incoming CFA Offset:8 chromeos-chrome-69.0.3456.0_rc-r1: LLVM ERROR: Found 1 in/out CFI information errors. chromeos-chrome-69.0.3456.0_rc-r1: clang-7: error: linker command failed with exit code 1 (use -v to see invocation) chromeos-chrome-69.0.3456.0_rc-r1: chromeos-chrome-69.0.3456.0_rc-r1: [645/15032] CXX irt_x64/obj/ui/gfx/memory_buffer_sources/generic_shared_memory_id.o[K chromeos-chrome-69.0.3456.0_rc-r1: [646/15032] CXX irt_x64/obj/third_party/protobuf/protobuf_lite/atomicops_internals_x86_msvc.o[K chromeos-chrome-69.0.3456.0_rc-r1: [647/15032] CXX irt_x64/obj/third_party/protobuf/protobuf_lite/atomicops_internals_x86_gcc.o[K chromeos-chrome-69.0.3456.0_rc-r1: [648/15032] CXX irt_x64/obj/third_party/protobuf/protobuf_lite/once.o[K chromeos-chrome-69.0.3456.0_rc-r1: [649/15032] CXX irt_x64/obj/third_party/protobuf/protobuf_lite/int128.o[K chromeos-chrome-69.0.3456.0_rc-r1: [650/15032] CXX irt_x64/obj/third_party/protobuf/protobuf_lite/wire_format_lite.o[K chromeos-chrome-69.0.3456.0_rc-r1: [651/15032] CXX irt_x64/obj/third_party/protobuf/protobuf_lite/strutil.o[K chromeos-chrome-69.0.3456.0_rc-r1: [652/15032] CXX irt_x64/obj/ui/gfx/memory_buffer_sources/gpu_memory_buffer.o[K chromeos-chrome-69.0.3456.0_rc-r1: [653/15032] CXX irt_x64/obj/third_party/protobuf/protobuf_lite/common.o[K chromeos-chrome-69.0.3456.0_rc-r1: [654/15032] CXX irt_x64/obj/third_party/protobuf/protobuf_lite/stringprintf.o[K chromeos-chrome-69.0.3456.0_rc-r1: [655/15032] CXX irt_x64/obj/third_party/protobuf/protobuf_lite/status.o[K chromeos-chrome-69.0.3456.0_rc-r1: [656/15032] CXX irt_x64/obj/third_party/protobuf/protobuf_lite/extension_set.o[K chromeos-chrome-69.0.3456.0_rc-r1: [657/15032] CXX irt_x64/obj/ppapi/proxy/ipc_sources/ppapi_messages.o[K chromeos-chrome-69.0.3456.0_rc-r1: [658/15032] LINK ./media_unittests[K chromeos-chrome-69.0.3456.0_rc-r1: FAILED: media_unittests chromeos-chrome-69.0.3456.0_rc-r1: python "../../../../../../../home/chrome-bot/chrome_root/src/build/toolchain/gcc_link_wrapper.py" --output="./media_unittests" -- x86_64-cros-linux-gnu-clang++ -B/usr/x86_64-pc-linux-gnu/x86_64-cros-linux-gnu/binutils-bin/2.27.0-gold -Wl,--fatal-warnings -Wl,--build-id=sha1 -fPIC -Wl,-z,noexecstack -Wl,-z,now -Wl,-z,relro -Wl,-z,defs -Wl,--as-needed -fuse-ld=gold -B../../../../../../../home/chrome-bot/chrome_root/src/third_party/binutils/Linux_x64/Release/bin -Wl,--icf=all -flto=thin -Wl,-plugin-opt,jobs=8 -fwhole-program-vtables -m64 -Wl,-O2 -Wl,--gc-sections -Wl,--gdb-index --sysroot=../../../../../../../build/lulu -L../../../../../../../build/lulu/lib64 -Wl,-rpath-link=../../../../../../../build/lulu/lib64 -L../../../../../../../build/lulu/usr/lib64 -Wl,-rpath-link=../../../../../../../build/lulu/usr/lib64 -L../../../../../../../build/lulu/usr/local/lib64 -Wl,-rpath-link=../../../../../../../build/lulu/usr/local/lib64 -L../../../../../../../build/lulu/lib -Wl,-rpath-link=../../../../../../../build/lulu/lib -L../../../../../../../build/lulu/usr/lib -Wl,-rpath-link=../../../../../../../build/lulu/usr/lib -L../../../../../../../build/lulu/usr/local/lib -Wl,-rpath-link=../../../../../../../build/lulu/usr/local/lib -L../../../../../../../build/lulu/usr/x86_64-cros-linux-gnu/lib -Wl,-rpath-link=../../../../../../../build/lulu/usr/x86_64-cros-linux-gnu/lib -fsanitize=cfi-vcall -fsanitize=cfi-derived-cast -fsanitize=cfi-unrelated-cast -Wl,-rpath-link=. -Wl,--disable-new-dtags -L/build/lulu/usr/lib64 -L/build/lulu/usr/lib -Wl,-O1 -Wl,-O2 -Wl,--as-needed -stdlib=libc++ -Wl,-plugin-opt,-import-instr-limit=30 -o "./media_unittests" -Wl,--start-group @"./media_unittests.rsp" -Wl,--end-group -ldl -lpthread -lrt -ldbus-1 -lfontconfig -lsmime3 -lnss3 -lnssutil3 -lplds4 -lplc4 -lnspr4 -lasound -lcras -lexpat -ldrm -lsync -lm -lz -lresolv -lEGL -lGLESv2 -lxkbcommon -lgestures -levdev -lgbm -lpci chromeos-chrome-69.0.3456.0_rc-r1: *** Inconsistent CFA register and/or offset between pred and succ *** chromeos-chrome-69.0.3456.0_rc-r1: Pred: outgoing CFA Reg:6 chromeos-chrome-69.0.3456.0_rc-r1: Pred: outgoing CFA Offset:16 chromeos-chrome-69.0.3456.0_rc-r1: Succ: incoming CFA Reg:7 chromeos-chrome-69.0.3456.0_rc-r1: Succ: incoming CFA Offset:8 chromeos-chrome-69.0.3456.0_rc-r1: LLVM ERROR: Found 1 in/out CFI information errors. chromeos-chrome-69.0.3456.0_rc-r1: clang-7: error: linker command failed with exit code 1 (use -v to see invocation) Interestingly, canary builds are fine e.g. https://uberchromegw.corp.google.com/i/chromeos/builders/caroline-release/builds/1833 https://uberchromegw.corp.google.com/i/chromeos/builders/kefka-release/builds/2294
,
Jun 13 2018
,
Jun 13 2018
,
Jun 13 2018
I think vtsyrklevich was looking at a bad interaction between CFI and the-other-CFI a while back, I'm not sure if this was what it was, though.
,
Jun 13 2018
CFI verification is controlled by the flag verify-cfiinstrs (false by default).
static cl::opt<bool> VerifyCFI("verify-cfiinstrs"
cl::desc("Verify Call Frame Information instructions"),
cl::init(false),
cl::Hidden
Grepping for verify-cfiinstrs in llvm does not turn up any places that might be turning it on. So I suppose, it is added by chromium itself but where?
,
Jun 13 2018
Looks like this check was previously triggered for builds with asserts ON (llvm-next is built with asserts) before it was moved under verify-cfiinstrs flag. commit 44b4b3a25821d2024d98417752844a0809ecd204 Author: Petar Jovanovic <petar.jovanovic@mips.com> Date: Mon May 7 14:09:33 2018 +0000 Add option -verify-cfiinstrs to run verifier in CFIInstrInserter Instead of enabling it for non NDEBUG builds, use -verify-cfiinstrs to run verifier in CFIInstrInserter. It defaults to false. Differential Revision: https://reviews.llvm.org/D46444 -#ifndef NDEBUG - if (unsigned ErrorNum = verify(MF)) - report_fatal_error("Found " + Twine(ErrorNum) + - " in/out CFI information errors."); -#endif + + if (VerifyCFI) { + if (unsigned ErrorNum = verify(MF)) + report_fatal_error("Found " + Twine(ErrorNum) + + " in/out CFI information errors."); + }
,
Jun 13 2018
I found Vlad's report and it was the exact same problem. http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20180430/547569.html You probably need to update LLVM then.
,
Jun 13 2018
pcc@ Can you clarify if we should disable the CFI verification by picking https://reviews.llvm.org/rL331635? Or is there another patch that actually fixes the problem. Also, should we be turning on verify-cfiinstrs for Chromium CFI builds?
,
Jun 13 2018
-verify-cfiinstrs is still disabled on trunk so I would just land that patch for now. The pass that check is failing in was newly introduced when that failure started occurring so they chose to disable it by default, I'd stick with keeping it disabled until the maintainers choose to turn it on by default.
,
Jun 14 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/39bf8de668515a49f48004a04d6ae662dc238655 commit 39bf8de668515a49f48004a04d6ae662dc238655 Author: Yunlian Jiang <yunlian@google.com> Date: Thu Jun 14 21:40:47 2018 llvm: disable cfiinstrs check. This cherry picks an upstream patch to disable cfiinstris check in debug build. BUG= chromium:852466 TEST=cros tryjob samus-llvm-next-toolchain-tryjob Change-Id: If3b962137d3c9d43b209ff90a5e89f9d14ac84c5 Reviewed-on: https://chromium-review.googlesource.com/1099959 Commit-Ready: Yunlian Jiang <yunlian@chromium.org> Tested-by: Yunlian Jiang <yunlian@chromium.org> Reviewed-by: Manoj Gupta <manojgupta@chromium.org> [rename] https://crrev.com/39bf8de668515a49f48004a04d6ae662dc238655/sys-devel/llvm/llvm-7.0_pre331547_p20180529-r2.ebuild [add] https://crrev.com/39bf8de668515a49f48004a04d6ae662dc238655/sys-devel/llvm/files/cherry/44b4b3a25821d2024d98417752844a0809ecd204.patch
,
Jun 15 2018
|
|||||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||||
Comment 1 by manojgupta@chromium.org
, Jun 13 2018