annotate libsanitizer/HOWTO_MERGE @ 125:2c7bdd5a49f6

supress return with no value, in function returning non-void warning on goto code segment in normal function
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Sun, 01 Apr 2018 14:05:45 +0900
parents 04ced10e8804
children 1830386684a0
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 In general, merging process should not be very difficult, but we need to
kono
parents:
diff changeset
2 track various ABI changes and GCC-specific patches carefully. Here is a
kono
parents:
diff changeset
3 general list of actions required to perform the merge:
kono
parents:
diff changeset
4
kono
parents:
diff changeset
5 * Checkout recent GCC tree.
kono
parents:
diff changeset
6 * Run merge.sh script from libsanitizer directory.
kono
parents:
diff changeset
7 * Modify Makefile.am files into asan/tsan/lsan/ubsan/sanitizer_common/interception
kono
parents:
diff changeset
8 directories if needed. In particular, you may need to add new source files
kono
parents:
diff changeset
9 and remove old ones in source files list, add new flags to {C, CXX}FLAGS if
kono
parents:
diff changeset
10 needed and update DEFS with new defined variables. You can find these changes
kono
parents:
diff changeset
11 in corresponding CMakeLists.txt and config-ix.cmake files from compiler-rt source
kono
parents:
diff changeset
12 directory.
kono
parents:
diff changeset
13 * Apply all needed GCC-specific patches to libsanitizer (note that some of
kono
parents:
diff changeset
14 them might be already included to upstream). The list of these patches is stored
kono
parents:
diff changeset
15 into LOCAL_PATCHES file.
kono
parents:
diff changeset
16 * Apply all necessary compiler changes. Be especially careful here, you must
kono
parents:
diff changeset
17 not break ABI between compiler and library. You can reveal these changes by
kono
parents:
diff changeset
18 inspecting the history of AddressSanitizer.cpp and ThreadSanitizer.cpp files
kono
parents:
diff changeset
19 from LLVM source tree.
kono
parents:
diff changeset
20 * Update ASan testsuite with corresponding tests from lib/asan/tests directory.
kono
parents:
diff changeset
21 Not all tests can be migrated easily, so you don't need them all to be adapted.
kono
parents:
diff changeset
22 * Modify configure.ac file if needed (e.g. if you need to add link against new
kono
parents:
diff changeset
23 library for sanitizer lilbs).
kono
parents:
diff changeset
24 * Add new target platforms in configure.tgt script if needed.
kono
parents:
diff changeset
25 * Bump SONAME for sanitizer libraries in asan/tsan/ubsan libtool-version files
kono
parents:
diff changeset
26 if ABI has changed.
kono
parents:
diff changeset
27 * Regenerate configure script and all Makefiles by autoreconf. You should use
kono
parents:
diff changeset
28 exactly the same autoconf and automake versions as for other GCC directories (current
kono
parents:
diff changeset
29 versions are written in Makefile.in and configure files).
kono
parents:
diff changeset
30 * Run regression testing on at least three platforms (e.g. x86-linux-gnu, x86_64-linux-gnu,
kono
parents:
diff changeset
31 aarch64-linux-gnu, arm-linux-gnueabi).
kono
parents:
diff changeset
32 * Run {A, UB}San bootstrap on at least three platforms.
kono
parents:
diff changeset
33 * Compare ABI of corresponding libclang_rt-asan and newly build libasan libraries.
kono
parents:
diff changeset
34 You can use a pretty good libabigail tool (https://sourceware.org/libabigail/index.html)
kono
parents:
diff changeset
35 to perform such a comparision. Note, that the list of exported symbols may differ,
kono
parents:
diff changeset
36 e.g. because libasan currently does not include UBSan runtime.
kono
parents:
diff changeset
37 * Split your changes into logical parts (e.g. raw merge, compiler changes, GCC-specific changes
kono
parents:
diff changeset
38 in libasan, configure/Makefile changes). The review process has O(N^2) complexity, so you
kono
parents:
diff changeset
39 would simplify and probably speed up the review process by doing this.
kono
parents:
diff changeset
40 * Send your patches for review to GCC Patches Mailing List (gcc-patches@gcc.gnu.org).
kono
parents:
diff changeset
41 * Update LOCAL_PATCHES file when you've committed the whole patch set with new revisions numbers.