public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "Dmitriy.Poterukha at uvoteam dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug sanitizer/87191] UBSan doesn't catch invalid pointer arithmetic outside known object bounds Date: Thu, 06 Oct 2022 12:33:16 +0000 [thread overview] Message-ID: <bug-87191-4-Da1BuLf3qk@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-87191-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87191 --- Comment #6 from creeon <Dmitriy.Poterukha at uvoteam dot com> --- #0 0x401191 in bar (/home/marxin/Programming/testcases/a.out+0x401191) #1 0x40122a in main https://stemhave.com/programming-help.html (/home/marxin/Programming/testcases/a.out+0x40122a) #2 0x7ffff6c71fea in __libc_start_main ../csu/libc-start.c:308 #3 0x4010a9 in _start (/home/marxin/Programming/testcases/a.out+0x4010a9) At a minimum we should diagnose if offsetting a pointer to a toplevel object not by 0/1 (ideally also if not by 0 and then dereferencing?), e.g.: warning: creating out-of-bounds pointer based on complete object 'a' How i canl all fix it?
prev parent reply other threads:[~2022-10-06 12:33 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top [not found] <bug-87191-4@http.gcc.gnu.org/bugzilla/> 2022-10-06 12:32 ` Dmitriy.Poterukha at uvoteam dot com 2022-10-06 12:33 ` Dmitriy.Poterukha at uvoteam dot com [this message]
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-87191-4-Da1BuLf3qk@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).