public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "wcohen at redhat dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug debug/103241] Odd 0 length entries in location lists Date: Tue, 16 Nov 2021 14:46:57 +0000 [thread overview] Message-ID: <bug-103241-4-jh3JAtaYWN@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-103241-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103241 --- Comment #2 from Will Cohen <wcohen at redhat dot com> --- Yes, the kernel vmlinux is too large and isn't a great reproducer for this. Need a much smaller example. Trying to compile just the linux/arch/x86/mm/pat/set_memory.c with -save-temps to provide a better view of what GCC is doing. From the output of llvm-dwarfdump there seems to be two flavors of 0-length location list entries: -At the very beginning of the function "start" has "[0xffffffff8107a540, 0xffffffff8107a540): DW_OP_reg5 RDI" followed by "[0xffffffff8107a540, 0xffffffff8107a569): DW_OP_reg5 RDI, DW_OP_piece 0x8" -The function is has two regions: [0xffffffff8107a540, 0xffffffff8107a6cb) [0xffffffff81bc6967, 0xffffffff81bc6a24)) A number of the arguments have 0-length location lists of the form (for "start"): [0xffffffff8107a6cb, 0xffffffff8107a6cb): DW_OP_reg4 RSI Removed the arch/x86/mm/pat/set_memory.o file from kernel build, did a "make V=1 > problems". Extracted the command line and added a -save-temps: gcc -save-temps -Wp,-MMD,arch/x86/mm/pat/.set_memory.o.d -nostdinc -I./arch/x86/include -I./arch/x86/include/generated -I./include -I./arch/x86/include/uapi -I./arch/x86/include/generated/uapi -I./include/uapi -I./include/generated/uapi -include ./include/linux/compiler-version.h -include ./include/linux/kconfig.h -include ./include/linux/compiler_types.h -D__KERNEL__ -fmacro-prefix-map=./= -Wall -Wundef -Werror=strict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -fshort-wchar -fno-PIE -Werror=implicit-function-declaration -Werror=implicit-int -Werror=return-type -Wno-format-security -std=gnu89 -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -fcf-protection=none -m64 -falign-jumps=1 -falign-loops=1 -mno-80387 -mno-fp-ret-in-387 -mpreferred-stack-boundary=3 -mskip-rax-setup -mtune=generic -mno-red-zone -mcmodel=kernel -Wno-sign-compare -fno-asynchronous-unwind-tables -mindirect-branch=thunk-extern -mindirect-branch-register -fno-jump-tables -fno-delete-null-pointer-checks -Wno-frame-address -Wno-format-truncation -Wno-format-overflow -Wno-address-of-packed-member -O2 -fno-allow-store-data-races -Wframe-larger-than=2048 -fstack-protector -Werror "-Wimplicit-fallthrough=5" -Wno-main -Wno-unused-but-set-variable -Wno-unused-const-variable -fno-stack-clash-protection -pg -mrecord-mcount -mfentry -DCC_USING_FENTRY -Wdeclaration-after-statement -Wvla -Wno-pointer-sign -Wno-stringop-truncation -Wno-zero-length-bounds -Wno-array-bounds -Wno-stringop-overflow -Wno-restrict -Wno-maybe-uninitialized -Wno-alloc-size-larger-than -fno-strict-overflow -fno-stack-check -fconserve-stack -Werror=date-time -Werror=incompatible-pointer-types -Werror=designated-init -Wno-packed-not-aligned -g -DKBUILD_MODFILE='"arch/x86/mm/pat/set_memory"' -DKBUILD_BASENAME='"set_memory"' -DKBUILD_MODNAME='"set_memory"' -D__KBUILD_MODNAME=kmod_set_memory -c -o arch/x86/mm/pat/set_memory.o arch/x86/mm/pat/set_memory.c ; ./tools/objtool/objtool orc generate --no-fp --retpoline --uaccess arch/x86/mm/pat/set_memory.o The set_memory.s is still pretty large, but shows what the gcc is generating for the debuginfo.
next prev parent reply other threads:[~2021-11-16 14:46 UTC|newest] Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-11-15 1:17 [Bug debug/103241] New: " wcohen at redhat dot com 2021-11-16 14:11 ` [Bug debug/103241] " jakub at gcc dot gnu.org 2021-11-16 14:46 ` wcohen at redhat dot com [this message] 2021-11-16 14:51 ` wcohen at redhat dot com 2021-11-16 15:11 ` marxin at gcc dot gnu.org 2021-11-16 15:24 ` wcohen at redhat dot com 2021-11-16 15:39 ` marxin at gcc dot gnu.org 2021-11-16 16:18 ` wcohen at redhat dot com 2021-11-18 10:24 ` marxin at gcc dot gnu.org 2021-11-18 10:35 ` jakub at gcc dot gnu.org 2021-11-18 15:11 ` wcohen at redhat dot com 2021-11-18 15:23 ` jakub at gcc dot gnu.org 2021-11-18 16:00 ` wcohen at redhat dot com 2021-11-18 16:18 ` jakub at gcc dot gnu.org 2021-11-19 10:18 ` aoliva at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-103241-4-jh3JAtaYWN@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).