* c-ubsan.c: Include asan.h.
(ubsan_instrument_return): Call initialize_sanitizer_builtins.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@209222
138bc75d-0d04-0410-961f-
82ee72b054a4
+2014-04-08 Marek Polacek <polacek@redhat.com>
+
+ PR sanitizer/60745
+ * c-ubsan.c: Include asan.h.
+ (ubsan_instrument_return): Call initialize_sanitizer_builtins.
+
2014-04-03 Nathan Sidwell <nathan@codesourcery.com>
* c.opt (Wnon-virtual-dtor): Auto set when Weffc++.
#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. */
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);