https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70147
--- Comment #7 from Bernd Edlinger ---
But how about that?
diff -up gcc/cp/cp-ubsan.c.jj gcc/cp/cp-ubsan.c
--- gcc/cp/cp-ubsan.c.jj2016-03-04 23:10:49.0 +0100
+++ gcc/cp/cp-ubsan.c 2016-03-14 12:09:38.730344495 +0100
@@ -283,7
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70147
--- Comment #6 from Martin Liška ---
Thank you Jakub for the reduced test-case.
As I've read the source code, current_vtt_parm is
properly defined in start_preparsed_function function.
vtt_parm definition:
/* In a base member initializer, we can
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70147
Jakub Jelinek changed:
What|Removed |Added
Status|UNCONFIRMED |ASSIGNED
Last reconfirmed|
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70147
Jakub Jelinek changed:
What|Removed |Added
CC||jason at gcc dot gnu.org
--- Comment #4
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70147
--- Comment #3 from Martin Liška ---
Ok, so I analyzed more precisely what happens. The problem is that we want to
zero vtbp_ptr.ios_base (struct ios_base),
but as we are at the very beginning of a basic_istream::basic_istream,
following value is
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70147
--- Comment #2 from Martin Liška ---
I tries to isolate the issue (attached patch reduces just the problematic
instrumentation):
$ g++ metafunction.ii -fsanitize=vptr -fdump-tree-optimized -g -O1
-flifetime-dse=0
binfo modified (zeroed)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70147
--- Comment #1 from Markus Trippelsdorf ---
-fsanitize=vptr is enough.