Message ID | 20140405173634.GJ24603@redhat.com |
---|---|
State | New |
Headers | show |
On Apr 5, 2014, at 10:36 AM, Marek Polacek <polacek@redhat.com> wrote: > > I'll wait a day or two for possible comments. So, my only comment would be it would be nice to document the flags that can vary between pch creation and use time, and which cause an invalidation of the pch file. This flag then is documented as safe to change and not invalidate the pch file.
On Sun, Apr 06, 2014 at 09:46:12AM -0700, Mike Stump wrote: > On Apr 5, 2014, at 10:36 AM, Marek Polacek <polacek@redhat.com> wrote: > > > > I'll wait a day or two for possible comments. > > So, my only comment would be it would be nice to document the flags that can vary between pch creation and use time, and which cause an invalidation of the pch file. This flag then is documented as safe to change and not invalidate the pch file. That might be nice, but currently there isn't any such list, right? Marek
On Apr 7, 2014, at 10:57 AM, Marek Polacek <polacek@redhat.com> wrote: > On Sun, Apr 06, 2014 at 09:46:12AM -0700, Mike Stump wrote: >> On Apr 5, 2014, at 10:36 AM, Marek Polacek <polacek@redhat.com> wrote: >>> >>> I'll wait a day or two for possible comments. >> >> So, my only comment would be it would be nice to document the flags that can vary between pch creation and use time, and which cause an invalidation of the pch file. This flag then is documented as safe to change and not invalidate the pch file. > > That might be nice, but currently there isn't any such list, right? No, I don’t think there is. Generally speaking, very few flags are safe to change.
diff --git gcc/c-family/c-ubsan.c gcc/c-family/c-ubsan.c index dc4d981..e89ebc1 100644 --- gcc/c-family/c-ubsan.c +++ gcc/c-family/c-ubsan.c @@ -29,6 +29,7 @@ along with GCC; see the file COPYING3. If not see #include "ubsan.h" #include "c-family/c-common.h" #include "c-family/c-ubsan.h" +#include "asan.h" /* Instrument division by zero and INT_MIN / -1. If not instrumenting, return NULL_TREE. */ @@ -185,6 +186,10 @@ ubsan_instrument_vla (location_t loc, tree size) tree ubsan_instrument_return (location_t loc) { + /* It is possible that PCH zapped table with definitions of sanitizer + builtins. Reinitialize them if needed. */ + initialize_sanitizer_builtins (); + tree data = ubsan_create_data ("__ubsan_missing_return_data", &loc, NULL, NULL_TREE); tree t = builtin_decl_explicit (BUILT_IN_UBSAN_HANDLE_MISSING_RETURN);