public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug sanitizer/67515] crash from ubsan for non-virtual call in initializer list with an invalid vtable Date: Wed, 09 Sep 2015 13:33:00 -0000 [thread overview] Message-ID: <bug-67515-4-UCYoLZrAgU@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-67515-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67515 --- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> --- You can get the same segfault with clang++ e.g. on struct A { int a; A () {} int foo () { return 1; } virtual ~A () {} }; alignas (A) char buf[sizeof (A)]; void foo (void *x) { A *y = (A *) x; y->foo (); } int main () { __builtin_memset (buf, '\x7f', sizeof 0); foo (&buf); } (but as in this case it is really called on object not even started to be constructed, there is no other workaround than to slow down the library).
prev parent reply other threads:[~2015-09-09 13:33 UTC|newest] Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top 2015-09-09 11:49 [Bug sanitizer/67515] New: "invalid vptr" false positive or crash from ubsan for non-virtual call in initializer list rogero at howzatt dot demon.co.uk 2015-09-09 12:37 ` [Bug sanitizer/67515] " redi at gcc dot gnu.org 2015-09-09 12:41 ` redi at gcc dot gnu.org 2015-09-09 12:51 ` trippels at gcc dot gnu.org 2015-09-09 13:09 ` rogero at howzatt dot demon.co.uk 2015-09-09 13:10 ` trippels at gcc dot gnu.org 2015-09-09 13:21 ` jakub at gcc dot gnu.org 2015-09-09 13:26 ` [Bug sanitizer/67515] crash from ubsan for non-virtual call in initializer list with an invalid vtable pinskia at gcc dot gnu.org 2015-09-09 13:33 ` jakub at gcc dot gnu.org [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-67515-4-UCYoLZrAgU@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).