From patchwork Mon Nov 7 09:14:39 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Ostapenko X-Patchwork-Id: 81014 Delivered-To: patch@linaro.org Received: by 10.140.97.165 with SMTP id m34csp913076qge; Mon, 7 Nov 2016 01:15:54 -0800 (PST) X-Received: by 10.98.19.137 with SMTP id 9mr11599107pft.150.1478510154324; Mon, 07 Nov 2016 01:15:54 -0800 (PST) Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id 73si20695620pft.153.2016.11.07.01.15.54 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 07 Nov 2016 01:15:54 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-return-440577-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org; spf=pass (google.com: domain of gcc-patches-return-440577-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-440577-patch=linaro.org@gcc.gnu.org DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :subject:to:cc:from:message-id:date:mime-version:in-reply-to :content-type:references; q=dns; s=default; b=udc2GxxCHj+OulCsFC 8Q76vEnwVnu9LHAwPb+KXMF0v4zShd8Cgotot4hAycLprZhFXDpgFpVrvgI8Gs0P UnW3zSSPfBYLSfR8vbaS+R8hFZJXdyM/CDyqZoECLQNVCva9yyiNnWPCrlqX7qvI Eb5YfvM/9e3PYfw1C7l1+xiQU= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :subject:to:cc:from:message-id:date:mime-version:in-reply-to :content-type:references; s=default; bh=rXQl6dD1+rsmsDEQGqaUkzGU 50I=; b=kmoLj6nbp9ULG+1XqLjQvkVj/hj5r8DToYv4Gzp2HFIhmV8b+Y/fbKK8 IahOJ+Klb28p8V/Z7LptKcAVflWh+iYEJJmHk5qfCiNRs4wAz/Q3iAIufsKFouL5 3/MDuX9NoJDFtq5hnZJxY1iLQDx/zPduIx4vMr0sMbA7WSYCuwA= Received: (qmail 6438 invoked by alias); 7 Nov 2016 09:14:59 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 6334 invoked by uid 89); 7 Nov 2016 09:14:58 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.7 required=5.0 tests=BAYES_00, KAM_LAZY_DOMAIN_SECURITY, RP_MATCHES_RCVD, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=u64, Changed, HContent-type:multipart, HContent-type:boundary X-HELO: mailout1.w1.samsung.com Received: from mailout1.w1.samsung.com (HELO mailout1.w1.samsung.com) (210.118.77.11) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 07 Nov 2016 09:14:47 +0000 Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout1.w1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0OG9005CVLOJAA60@mailout1.w1.samsung.com> for gcc-patches@gcc.gnu.org; Mon, 07 Nov 2016 09:14:43 +0000 (GMT) Received: from eusmges5.samsung.com (unknown [203.254.199.245]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20161107091442eucas1p18eb392723f70a0c63c4db7e82734096b~EuRYXgsly0980909809eucas1p1K; Mon, 7 Nov 2016 09:14:42 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges5.samsung.com (EUCPMTA) with SMTP id C4.CF.19540.10640285; Mon, 7 Nov 2016 09:14:41 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20161107091441eucas1p177cde20482adccb3cb94d71e26f0e337~EuRXrP8ZF0981709817eucas1p19; Mon, 7 Nov 2016 09:14:41 +0000 (GMT) Received: from eusync3.samsung.com ( [203.254.199.213]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 49.66.10494.3E540285; Mon, 7 Nov 2016 09:14:11 +0000 (GMT) Received: from [106.109.129.18] by eusync3.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0OG9005DFLOF6Z10@eusync3.samsung.com>; Mon, 07 Nov 2016 09:14:40 +0000 (GMT) Subject: Re: [PATCH 0/7] Libsanitizer merge from upstream r285547. To: Jakub Jelinek Cc: GCC Patches , Kostya Serebryany , Yuri Gribov From: Maxim Ostapenko Message-id: <582045FF.4080205@samsung.com> Date: Mon, 07 Nov 2016 12:14:39 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-version: 1.0 In-reply-to: <20161107083942.GC3541@tucnak.redhat.com> Content-type: multipart/mixed; boundary=------------060402050106080302090302 X-MTR: 20000000000000000@CPGS X-CMS-MailID: 20161107091441eucas1p177cde20482adccb3cb94d71e26f0e337 X-Msg-Generator: CA X-Sender-IP: 182.198.249.180 X-Local-Sender: =?UTF-8?B?TWFrc2ltIE9zdGFwZW5rbxtTUlItU1cgVG9vbHMgTGFiGw==?= =?UTF-8?B?7IK87ISx7KCE7J6QG0VuZ2luZWVy?= X-Global-Sender: =?UTF-8?B?TWF4aW0gT3N0YXBlbmtvG1NSUi1TVyBUb29scyBMYWIbU2Ft?= =?UTF-8?B?c3VuZ8KgRWxlY3Ryb25pY3MbRW5naW5lZXI=?= X-Sender-Code: =?UTF-8?B?QzEwG0NJU0hRG0MxMEdEMDFHRDAxMDE1Nw==?= CMS-TYPE: 201P X-HopCount: 7 X-CMS-RootMailID: 20161107082229eucas1p2b7db548c790652a933f5f0d55fe76e50 X-RootMTR: 20161107082229eucas1p2b7db548c790652a933f5f0d55fe76e50 References: <582039C4.4040606@samsung.com> <20161107083942.GC3541@tucnak.redhat.com> X-IsSubscribed: yes On 07/11/16 11:39, Jakub Jelinek wrote: > On Mon, Nov 07, 2016 at 11:22:28AM +0300, Maxim Ostapenko wrote: >> this patch set performs libsanitizer merge from upstream. >> >> Patch 1 is the library merge itself. >> >> Patch 2 is the reapplied change for SPARC by David S. Miller. >> >> Patch 3 changes heuristic for extracting last PC from stack frame for ARM in >> fast unwind routine. More details can be found here >> (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61771). >> >> Patch 4 replaces Jakub's fix for >> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63888 and removes >> CheckODRViolationViaPoisoning call from RegisterGlobal to avoid false >> positive odr violation reports. >> >> Patch 5 combines necessary compiler changes. >> >> Patch 6 adds several new tests, backported from upstream. >> >> Patch 7 adds support for ASan odr indicators at compiler side. >> >> The whole patch set was regtested/bootstrapped/ASan bootstrapped on >> x86_64-unknown-linux-gnu and i386-unknown-linux-gnu. >> Also, passed regression tests on arm-linux-gnueabi and aarch64-linux under >> QEMU. > So, libasan.so.* is again ABI incompatible, but libtsan and libubsan stay > (hopefully) backwards ABI compatible? libubsan is definitely compatible. For libtsan we have several changes: 1) Several interceptors (34 of them) were added and __interceptor_lstat{64} were removed. 2) __interceptor_strchr has change in its parameters type: __interceptor_strchr(char*, int) -> __interceptor_strchr(const char*, int) 3) tsan's internal type __tsan::ReportDesc has several changes, but it seems that this doesn't introduce ABI incompatibility with compiler side. Full abidiff listing is attached. So, I suppose libtsan is also compatible. -Maxim > > Jakub > > > Functions changes summary: 4 Removed, 3 Changed (70 filtered out), 34 Added functions Variables changes summary: 0 Removed, 0 Changed, 0 Added variable Function symbols changes summary: 0 Removed, 10 Added function symbols not referenced by debug info Variable symbols changes summary: 0 Removed, 0 Added variable symbol not referenced by debug info 4 Removed functions: 'function int __interceptor_lstat(const char*, void*)' {lstat, aliases __interceptor_lstat} 'function int __interceptor_lstat64(const char*, void*)' {lstat64, aliases __interceptor_lstat64} 'function int __interceptor_stat(const char*, void*)' {__interceptor_stat, aliases stat} 'function int __interceptor_stat64(const char*, void*)' {stat64, aliases __interceptor_stat64} 34 Added functions: 'function char* __interceptor_ctermid(char*)' {__interceptor_ctermid, aliases ctermid} 'function int __interceptor_epoll_pwait(int, void*, int, int, void*)' {epoll_pwait, aliases __interceptor_epoll_pwait} 'function int __interceptor_eventfd_read(int, __sanitizer::u64*)' {eventfd_read, aliases __interceptor_eventfd_read} 'function int __interceptor_eventfd_write(int, __sanitizer::u64)' {__interceptor_eventfd_write, aliases eventfd_write} 'function void* __interceptor_memmem(SIZE_T, SIZE_T)' {__interceptor_memmem, aliases memmem} 'function int __interceptor_pthread_sigmask(int, const __sanitizer::__sanitizer_sigset_t*, __sanitizer::__sanitizer_sigset_t*)' {__interceptor_pthread_sigmask, aliases pthread_sigmask} 'function SSIZE_T __interceptor_recvfrom(int, void*, SIZE_T, int, void*, int*)' {__interceptor_recvfrom, aliases recvfrom} 'function SSIZE_T __interceptor_sendto(int, void*, SIZE_T, int, void*, int)' {__interceptor_sendto, aliases sendto} 'function int __interceptor_sigblock(int)' {sigblock, aliases __interceptor_sigblock} 'function int __interceptor_sigsetmask(int)' {sigsetmask, aliases __interceptor_sigsetmask} 'function SIZE_T __interceptor_strnlen(const char*, SIZE_T)' {__interceptor_strnlen, aliases strnlen} 'function int __interceptor_ttyname_r(int, char*, SIZE_T)' {__interceptor_ttyname_r, aliases ttyname_r} 'function void __sanitizer_cov_trace_pc_guard_init()' {__sanitizer_cov_trace_pc_guard_init} 'function int __sanitizer_install_malloc_and_free_hooks(void (typedef __sanitizer::uptr)*, void ()*)' {__sanitizer_install_malloc_and_free_hooks} 'function void __sanitizer_set_report_fd(void*)' {__sanitizer_set_report_fd} 'function void __sanitizer_symbolize_global(__sanitizer::uptr, const char*, char*, __sanitizer::uptr)' {__sanitizer_symbolize_global} 'function void __sanitizer_symbolize_pc(__sanitizer::uptr, const char*, char*, __sanitizer::uptr)' {__sanitizer_symbolize_pc} 'function void __sanitizer_syscall_post_impl_rt_sigaction(long int, long int, const __sanitizer::__sanitizer_kernel_sigaction_t*, __sanitizer::__sanitizer_kernel_sigaction_t*, SIZE_T)' {__sanitizer_syscall_post_impl_rt_sigaction} 'function void __sanitizer_syscall_post_impl_sigaction(long int, long int, const __sanitizer::__sanitizer_kernel_sigaction_t*, __sanitizer::__sanitizer_kernel_sigaction_t*)' {__sanitizer_syscall_post_impl_sigaction} 'function void __sanitizer_syscall_pre_impl_rt_sigaction(long int, const __sanitizer::__sanitizer_kernel_sigaction_t*, __sanitizer::__sanitizer_kernel_sigaction_t*, SIZE_T)' {__sanitizer_syscall_pre_impl_rt_sigaction} 'function void __sanitizer_syscall_pre_impl_sigaction(long int, const __sanitizer::__sanitizer_kernel_sigaction_t*, __sanitizer::__sanitizer_kernel_sigaction_t*)' {__sanitizer_syscall_pre_impl_sigaction} 'function void __tsan::__tsan_on_report(const __tsan::ReportDesc*)' {__tsan_on_report} 'function bool __tsan::__tsan_symbolize_external(__sanitizer::uptr, char*, __sanitizer::uptr, char*, __sanitizer::uptr, int*, int*)' {__tsan_symbolize_external} 'function const char* __tsan_default_suppressions()' {__tsan_default_suppressions} 'function void* __tsan_get_current_report()' {__tsan_get_current_report} 'function int __tsan_get_report_data(void*, const char**, int*, int*, int*, int*, int*, int*, int*, void**, __sanitizer::uptr)' {__tsan_get_report_data} 'function int __tsan_get_report_loc(void*, __sanitizer::uptr, const char**, void**, __sanitizer::uptr*, __sanitizer::uptr*, int*, int*, int*, void**, __sanitizer::uptr)' {__tsan_get_report_loc} 'function int __tsan_get_report_mop(void*, __sanitizer::uptr, int*, void**, int*, int*, int*, void**, __sanitizer::uptr)' {__tsan_get_report_mop} 'function int __tsan_get_report_mutex(void*, __sanitizer::uptr, __sanitizer::uptr*, void**, int*, void**, __sanitizer::uptr)' {__tsan_get_report_mutex} 'function int __tsan_get_report_stack(void*, __sanitizer::uptr, void**, __sanitizer::uptr)' {__tsan_get_report_stack} 'function int __tsan_get_report_thread(void*, __sanitizer::uptr, int*, __sanitizer::uptr*, int*, const char**, int*, void**, __sanitizer::uptr)' {__tsan_get_report_thread} 'function int __tsan_get_report_unique_tid(void*, __sanitizer::uptr, int*)' {__tsan_get_report_unique_tid} 'function void __tsan_testonly_barrier_init(__sanitizer::u64*, __sanitizer::u32)' {__tsan_testonly_barrier_init} 'function void __tsan_testonly_barrier_wait(__sanitizer::u64*)' {__tsan_testonly_barrier_wait} 3 functions with some indirect sub-type change: [C]'function void* __interceptor_memmove(void*, void*, __sanitizer::uptr)' has some indirect sub-type changes: Please note that the symbol of this function is memmove and it aliases symbol: __interceptor_memmove parameter 2 of type 'void*' changed: entity changed from 'void*' to 'typedef __sanitizer::uptr' parameter 3 of type 'typedef __sanitizer::uptr' was removed [C]'function char* __interceptor_strchr(char*, int)' has some indirect sub-type changes: Please note that the symbol of this function is __interceptor_strchr and it aliases symbol: strchr parameter 1 of type 'char*' changed: in pointed to type 'char': entity changed from 'char' to 'const char' [C]'function bool __tsan::OnReport(const __tsan::ReportDesc*, bool)' has some indirect sub-type changes: parameter 1 of type 'const __tsan::ReportDesc*' has sub-type changes: in pointed to type 'const __tsan::ReportDesc': in unqualified underlying type 'class __tsan::ReportDesc': 2 data member changes (1 filtered): type of '__tsan::ReportType __tsan::ReportDesc::typ' changed: 1 enumerator insertion: '__tsan::ReportType::ReportTypeMutexInvalidAccess' value '7' 6 enumerator changes: '__tsan::ReportType::ReportTypeMutexBadUnlock' from value '7' to '8' '__tsan::ReportType::ReportTypeMutexBadReadLock' from value '8' to '9' '__tsan::ReportType::ReportTypeMutexBadReadUnlock' from value '9' to '10' '__tsan::ReportType::ReportTypeSignalUnsafe' from value '10' to '11' '__tsan::ReportType::ReportTypeErrnoInSignal' from value '11' to '12' '__tsan::ReportType::ReportTypeDeadlock' from value '12' to '13' type of '__tsan::Vector<__tsan::ReportLocation*> __tsan::ReportDesc::locs' changed: 1 data member changes (2 filtered): type of '__tsan::ReportLocation** __tsan::Vector<__tsan::ReportLocation*>::begin_' changed: in pointed to type '__tsan::ReportLocation*': in pointed to type 'struct __tsan::ReportLocation': type size changed from 704 to 832 bits 7 data member changes: type of '__sanitizer::DataInfo __tsan::ReportLocation::global' changed: type size changed from 320 to 448 bits 2 data member insertions: 'char* __sanitizer::DataInfo::file', at offset 128 (in bits) '__sanitizer::uptr __sanitizer::DataInfo::line', at offset 192 (in bits) 3 data member changes: 'char* __sanitizer::DataInfo::name' offset changed from 128 to 256 (in bits) '__sanitizer::uptr __sanitizer::DataInfo::start' offset changed from 192 to 320 (in bits) '__sanitizer::uptr __sanitizer::DataInfo::size' offset changed from 256 to 384 (in bits) '__sanitizer::uptr __tsan::ReportLocation::heap_chunk_start' offset changed from 384 to 512 (in bits) '__sanitizer::uptr __tsan::ReportLocation::heap_chunk_size' offset changed from 448 to 576 (in bits) 'int __tsan::ReportLocation::tid' offset changed from 512 to 640 (in bits) 'int __tsan::ReportLocation::fd' offset changed from 544 to 672 (in bits) 'bool __tsan::ReportLocation::suppressable' offset changed from 576 to 704 (in bits) '__tsan::ReportStack* __tsan::ReportLocation::stack' offset changed from 640 to 768 (in bits) 10 Added function symbols not referenced by debug info: __sanitizer_cov_trace_cmp1 __sanitizer_cov_trace_cmp2 __sanitizer_cov_trace_cmp4 __sanitizer_cov_trace_cmp8 __sanitizer_cov_trace_div4 __sanitizer_cov_trace_div8 __sanitizer_cov_trace_gep __sanitizer_cov_trace_pc_guard __sanitizer_cov_trace_pc_indir internal_sigreturn