re PR sanitizer/60557 (UBSAN: ICE after ubsan_expand_null_ifn)

PR sanitizer/60557
	* ubsan.c (ubsan_instrument_unreachable): Call
	initialize_sanitizer_builtins.
	(ubsan_pass): Likewise.

From-SVN: r208652
This commit is contained in:
Jakub Jelinek 2014-03-18 16:05:30 +01:00 committed by Jakub Jelinek
parent 415e2e6b2c
commit ead96f131d
2 changed files with 8 additions and 0 deletions

View File

@ -1,5 +1,10 @@
2014-03-18 Jakub Jelinek <jakub@redhat.com>
PR sanitizer/60557
* ubsan.c (ubsan_instrument_unreachable): Call
initialize_sanitizer_builtins.
(ubsan_pass): Likewise.
PR sanitizer/60535
* ubsan.c (ubsan_type_descriptor, ubsan_create_data): Call
varpool_finalize_decl instead of rest_of_decl_compilation.

View File

@ -512,6 +512,7 @@ ubsan_create_data (const char *name, location_t loc,
tree
ubsan_instrument_unreachable (location_t loc)
{
initialize_sanitizer_builtins ();
tree data = ubsan_create_data ("__ubsan_unreachable_data", loc, NULL,
NULL_TREE);
tree t = builtin_decl_explicit (BUILT_IN_UBSAN_HANDLE_BUILTIN_UNREACHABLE);
@ -847,6 +848,8 @@ ubsan_pass (void)
basic_block bb;
gimple_stmt_iterator gsi;
initialize_sanitizer_builtins ();
FOR_EACH_BB_FN (bb, cfun)
{
for (gsi = gsi_start_bb (bb); !gsi_end_p (gsi);)