* [PATCH] Fix UBSan builtin types
@ 2015-08-20 16:51 Yury Gribov
2015-08-20 17:35 ` Jeff Law
0 siblings, 1 reply; 2+ messages in thread
From: Yury Gribov @ 2015-08-20 16:51 UTC (permalink / raw)
To: Marek Polacek; +Cc: GCC Patches, Jakub Jelinek, Vyacheslav Tyrtov
[-- Attachment #1: Type: text/plain, Size: 406 bytes --]
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
[-- Attachment #2: fix-ubsan-builtin-types-1.patch --]
[-- Type: text/x-patch, Size: 1088 bytes --]
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",
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] Fix UBSan builtin types
2015-08-20 16:51 [PATCH] Fix UBSan builtin types Yury Gribov
@ 2015-08-20 17:35 ` Jeff Law
0 siblings, 0 replies; 2+ messages in thread
From: Jeff Law @ 2015-08-20 17:35 UTC (permalink / raw)
To: Yury Gribov, Marek Polacek; +Cc: GCC Patches, Jakub Jelinek, Vyacheslav Tyrtov
On 08/20/2015 10:42 AM, Yury Gribov wrote:
> 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
>
> fix-ubsan-builtin-types-1.patch
>
>
> 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.
OK.
jeff
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-08-20 17:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-20 16:51 [PATCH] Fix UBSan builtin types Yury Gribov
2015-08-20 17:35 ` Jeff Law
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).