From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 108327 invoked by alias); 20 Aug 2015 16:42:39 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 106270 invoked by uid 89); 20 Aug 2015 16:42:38 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.8 required=5.0 tests=AWL,BAYES_00,HDRS_LCASE,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD,SPF_HELO_PASS,T_MANY_HDRS_LCASE autolearn=no version=3.3.2 X-HELO: mailout3.w1.samsung.com Received: from mailout3.w1.samsung.com (HELO mailout3.w1.samsung.com) (210.118.77.13) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Thu, 20 Aug 2015 16:42:37 +0000 Received: from eucpsbgm1.samsung.com (unknown [203.254.199.244]) by mailout3.w1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0NTE00G5G3QW91B0@mailout3.w1.samsung.com> for gcc-patches@gcc.gnu.org; Thu, 20 Aug 2015 17:42:32 +0100 (BST) Received: from eusync3.samsung.com ( [203.254.199.213]) by eucpsbgm1.samsung.com (EUCPMTA) with SMTP id 4B.87.04846.87306D55; Thu, 20 Aug 2015 17:42:32 +0100 (BST) Received: from [106.109.9.145] by eusync3.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0NTE003743QVOD10@eusync3.samsung.com>; Thu, 20 Aug 2015 17:42:31 +0100 (BST) Message-id: <55D6037F.7030704@samsung.com> Date: Thu, 20 Aug 2015 16:51:00 -0000 From: Yury Gribov User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.8.0 MIME-version: 1.0 To: Marek Polacek Cc: GCC Patches , Jakub Jelinek , Vyacheslav Tyrtov Subject: [PATCH] Fix UBSan builtin types Content-type: multipart/mixed; boundary=------------050505060904050301030007 X-IsSubscribed: yes X-SW-Source: 2015-08/txt/msg01229.txt.bz2 This is a multi-part message in MIME format. --------------050505060904050301030007 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-length: 406 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 --------------050505060904050301030007 Content-Type: text/x-patch; name="fix-ubsan-builtin-types-1.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="fix-ubsan-builtin-types-1.patch" Content-length: 1088 commit d4747c9c7f78789ec7119fce07cd4526c4168ee0 Author: Yury Gribov Date: Thu Aug 20 19:10:30 2015 +0300 2015-08-20 Yury Gribov 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", --------------050505060904050301030007--