public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "arnd at linaro dot org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug sanitizer/99673] New: [11 Regression] bogus -Wstringop-overread warning with address sanitizer Date: Fri, 19 Mar 2021 16:59:10 +0000 [thread overview] Message-ID: <bug-99673-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99673 Bug ID: 99673 Summary: [11 Regression] bogus -Wstringop-overread warning with address sanitizer Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: sanitizer Assignee: unassigned at gcc dot gnu.org Reporter: arnd at linaro dot org CC: dodji at gcc dot gnu.org, dvyukov at gcc dot gnu.org, jakub at gcc dot gnu.org, kcc at gcc dot gnu.org, marxin at gcc dot gnu.org Target Milestone: --- Created attachment 50435 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50435&action=edit manually reduced test case gcc-11 warns about one file in the linux kernel, in which it fails to find the size of an object: $ arm-linux-gnueabi-gcc -Os -fno-inline-functions-called-once -fsanitize=address In function ‘ath11k_peer_assoc_h_vht’, inlined from ‘ath11k_peer_assoc_prepare’ at drivers/net/wireless/ath/ath11k/mac.c:92:2: drivers/net/wireless/ath/ath11k/mac.c:66:13: warning: ‘ath11k_peer_assoc_h_vht_masked’ reading 16 bytes from a region of size 4 [-Wstringop-overread] 66 | if (ath11k_peer_assoc_h_vht_masked(vht_mcs_mask)) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/net/wireless/ath/ath11k/mac.c: In function ‘ath11k_peer_assoc_prepare’: drivers/net/wireless/ath/ath11k/mac.c:66:13: note: referencing argument 1 of type ‘const u16 *’ {aka ‘const short unsigned int *’} drivers/net/wireless/ath/ath11k/mac.c:49:1: note: in a call to function ‘ath11k_peer_assoc_h_vht_masked’ 49 | ath11k_peer_assoc_h_vht_masked(const u16 vht_mcs_mask[NL80211_VHT_NSS_MAX]) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ I can't see where the '4' even comes from here, both in the original test case and the reduced version https://godbolt.org/z/79GE8M $ arm-linux-gnueabi-gcc --version arm-linux-gnueabi-gcc (GCC) 11.0.1 20210315 (experimental) The behavior seems to be target independent, I can reproduce it on arm and x86.
next reply other threads:[~2021-03-19 16:59 UTC|newest] Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-03-19 16:59 arnd at linaro dot org [this message] 2021-03-19 21:44 ` [Bug sanitizer/99673] [11 Regression] bogus -Wstringop-overread warning with address sanitizer due to member address substitution msebor at gcc dot gnu.org 2021-03-20 12:22 ` arnd at linaro dot org 2021-03-21 19:06 ` msebor at gcc dot gnu.org 2021-03-22 8:51 ` rguenth at gcc dot gnu.org 2021-03-22 16:07 ` arnd at linaro dot org 2021-04-08 13:09 ` rguenth at gcc dot gnu.org 2021-04-27 11:40 ` [Bug sanitizer/99673] [11/12 " jakub at gcc dot gnu.org 2021-07-28 7:06 ` rguenth at gcc dot gnu.org 2022-01-21 12:50 ` [Bug sanitizer/99673] [11 " rguenth at gcc dot gnu.org 2022-01-21 12:59 ` cvs-commit at gcc dot gnu.org 2022-01-21 13:42 ` marxin at gcc dot gnu.org 2022-04-21 7:48 ` rguenth at gcc dot gnu.org 2022-05-05 12:42 ` [Bug sanitizer/99673] [11/13 " rguenth at gcc dot gnu.org 2023-05-29 10:04 ` [Bug sanitizer/99673] [11/13/14 " jakub at gcc dot gnu.org 2024-03-27 7:37 ` pinskia 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-99673-4@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).