This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Fix UBSan builtin types


Hi all,

GCC builtins BUILT_IN_UBSAN_HANDLE_NONNULL_ARG and BUILT_IN_UBSAN_HANDLE_NONNULL_ARG_ABORT were using BT_FN_VOID_PTR_PTRMODE whereas they are really BT_FN_VOID_PTR:
  void __ubsan::__ubsan_handle_nonnull_return(NonNullReturnData *Data)

The patch fixes it. I only tested ubsan.exp (I doubt that bootstrap + full testsuite will add anything to this).

Ok for trunk?

Best regards,
Yury Gribov
commit d4747c9c7f78789ec7119fce07cd4526c4168ee0
Author: Yury Gribov <y.gribov@samsung.com>
Date:   Thu Aug 20 19:10:30 2015 +0300

    2015-08-20  Yury Gribov  <y.gribov@samsung.com>
    
    gcc/
    	* sanitizer.def (BUILT_IN_UBSAN_HANDLE_NONNULL_ARG,
    	BUILT_IN_UBSAN_HANDLE_NONNULL_ARG): Fix builtin types.

diff --git a/gcc/sanitizer.def b/gcc/sanitizer.def
index 7d14910..123b011 100644
--- a/gcc/sanitizer.def
+++ b/gcc/sanitizer.def
@@ -485,11 +485,11 @@ DEF_SANITIZER_BUILTIN(BUILT_IN_UBSAN_HANDLE_OUT_OF_BOUNDS_ABORT,
 		      ATTR_COLD_NORETURN_NOTHROW_LEAF_LIST)
 DEF_SANITIZER_BUILTIN(BUILT_IN_UBSAN_HANDLE_NONNULL_ARG,
 		      "__ubsan_handle_nonnull_arg",
-		      BT_FN_VOID_PTR_PTRMODE,
+		      BT_FN_VOID_PTR,
 		      ATTR_COLD_NOTHROW_LEAF_LIST)
 DEF_SANITIZER_BUILTIN(BUILT_IN_UBSAN_HANDLE_NONNULL_ARG_ABORT,
 		      "__ubsan_handle_nonnull_arg_abort",
-		      BT_FN_VOID_PTR_PTRMODE,
+		      BT_FN_VOID_PTR,
 		      ATTR_COLD_NORETURN_NOTHROW_LEAF_LIST)
 DEF_SANITIZER_BUILTIN(BUILT_IN_UBSAN_HANDLE_NONNULL_RETURN,
 		      "__ubsan_handle_nonnull_return",

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]