From patchwork Fri Oct 23 08:46:20 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: max X-Patchwork-Id: 534838 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id D52BF141320 for ; Fri, 23 Oct 2015 19:46:36 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=JoXrUS7D; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:to :from:subject:cc:message-id:date:mime-version:content-type; q= dns; s=default; b=KVFEs5ZEbcumQAazQToP/bEOamNKbalCLt9PiJyci6+Haa cmIFPiKkOk9F0q4LHs9D3tsZCGO75djJfEG9l5P+SAtEMFuFZmsiderGZP44/mEQ 3A+HNJMmBsaYKZH4vUHtUwOrhq3LlHpN4EnNnUsp9VgUS5vqDSlN5nUU0bxq0= 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:to :from:subject:cc:message-id:date:mime-version:content-type; s= default; bh=ez5LDStQra3PmShpLXW9YVL/dJ8=; b=JoXrUS7D5WdIGOqcKSkJ X57NMoKq5SFoopQAUAe5IGLA7aBoolv5vJpv6C0uQ67G+/u6u/GU5R70tpmw0vDp 1rXOiD0S2dv+NoN5/v0h9l/eb+2tj3MigPgrHJtSxoIfGnc66vtcWqYjc/7fHVW8 ihNN4Nbe4fLXnPy37J2unWM= Received: (qmail 58991 invoked by alias); 23 Oct 2015 08:46:29 -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 58976 invoked by uid 89); 23 Oct 2015 08:46:28 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=AWL, BAYES_00, KAM_LAZY_DOMAIN_SECURITY, RP_MATCHES_RCVD, SPF_HELO_PASS, T_HDRS_LCASE, 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; Fri, 23 Oct 2015 08:46:26 +0000 Received: from eucpsbgm2.samsung.com (unknown [203.254.199.245]) by mailout3.w1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0NWO004VZ0DA9A40@mailout3.w1.samsung.com> for gcc-patches@gcc.gnu.org; Fri, 23 Oct 2015 09:46:22 +0100 (BST) Received: from eusync4.samsung.com ( [203.254.199.214]) by eucpsbgm2.samsung.com (EUCPMTA) with SMTP id CA.23.05269.DD3F9265; Fri, 23 Oct 2015 09:46:22 +0100 (BST) Received: from [106.109.128.167] by eusync4.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0NWO00H9J0D9MF40@eusync4.samsung.com>; Fri, 23 Oct 2015 09:46:21 +0100 (BST) To: GCC Patches From: Maxim Ostapenko Subject: [Committed, PATCH] Update HOWTO_MERGE file for libsanitizer. Cc: Yury Gribov , Slava Garbuzov Message-id: <5629F3DC.9010100@partner.samsung.com> Date: Fri, 23 Oct 2015 11:46:20 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-version: 1.0 Content-type: multipart/mixed; boundary=------------070109080209090205070706 X-IsSubscribed: yes This patch updates libsanitizer/HOWTO_MERGE file according to Yura's nits here: https://gcc.gnu.org/ml/gcc-patches/2015-10/msg02039.html. Just a documentation patch, no changes in functionality. -Maxim Index: libsanitizer/HOWTO_MERGE =================================================================== --- libsanitizer/HOWTO_MERGE (revision 229212) +++ libsanitizer/HOWTO_MERGE (working copy) @@ -2,25 +2,38 @@ track various ABI changes and GCC-specific patches carefully. Here is a general list of actions required to perform the merge: -- Checkout recent GCC tree. -- Run merge.sh script from libsanitizer directory. -- Modify Makefile.am files into asan/tsan/lsan/ubsan/sanitizer_common/interception +* Checkout recent GCC tree. +* Run merge.sh script from libsanitizer directory. +* Modify Makefile.am files into asan/tsan/lsan/ubsan/sanitizer_common/interception directories if needed. In particular, you may need to add new source files and remove old ones in source files list, add new flags to {C, CXX}FLAGS if - needed and update DEFS with new defined variables. -- Apply all needed GCC-specific patches to libsanitizer (note that some of + needed and update DEFS with new defined variables. You can find these changes + in corresponding CMakeLists.txt and config-ix.cmake files from compiler-rt source + directory. +* Apply all needed GCC-specific patches to libsanitizer (note that some of them might be already included to upstream). -- Apply all necessary compiler changes. Be especially careful here, you must - not break ABI between compiler and library. -- Modify configure.ac file if needed (e.g. if you need to add link against new +* Apply all necessary compiler changes. Be especially careful here, you must + not break ABI between compiler and library. You can reveal these changes by + inspecting the history of AddressSanitizer.cpp and ThreadSanitizer.cpp files + from LLVM source tree. +* Update ASan testsuite with corresponding tests from lib/asan/tests directory. + Not all tests can be migrated easily, so you don't need them all to be adapted. +* Modify configure.ac file if needed (e.g. if you need to add link against new library for sanitizer lilbs). -- Remove unused (deleted by merge) files from all source and include - directories. Be especially careful with headers, because they aren't listed - in Makefiles explicitly. -- Regenerate configure script and all Makefiles by autoreconf. You should use - exactly the same autotools version as for other GCC directories (current - version is 2.64, https://www.gnu.org/software/automake/faq/autotools-faq.html - for details how to install/use it). -- Run regression testing on at least three platforms (e.g. x86-linux-gnu, - x86_64-linux-gnu, aarch64-linux-gnu). -- Run {A, UB}San bootstrap on at least three platforms. +* Add new target platforms in configure.tgt script if needed. +* Bump SONAME for sanitizer libraries in asan/tsan/ubsan libtool-version files + if ABI has changed. +* Regenerate configure script and all Makefiles by autoreconf. You should use + exactly the same autoconf and automake versions as for other GCC directories (current + versions are written in Makefile.in and configure files). +* Run regression testing on at least three platforms (e.g. x86-linux-gnu, x86_64-linux-gnu, + aarch64-linux-gnu, arm-linux-gnueabi). +* Run {A, UB}San bootstrap on at least three platforms. +* Compare ABI of corresponding libclang_rt-asan and newly build libasan libraries. + You can use a pretty good libabigail tool (https://sourceware.org/libabigail/index.html) + to perform such a comparision. Note, that the list of exported symbols may differ, + e.g. because libasan currently does not include UBSan runtime. +* Split your changes into logical parts (e.g. raw merge, compiler changes, GCC-specific changes + in libasan, configure/Makefile changes). The review process has O(N^2) complexity, so you + would simplify and probably speed up the review process by doing this. +* Send your patches for review to GCC Patches Mailing List (gcc-patches@gcc.gnu.org).