Merge "[ITC][iotcon][Non-ACR][Bugfix] Fix double-free" into tizen_3.0
[test/tct/native/api.git] / README_ASAN.txt
1 ================================================================================================
2 Date: 12 June 2016
3 Purpose: Instruction Guide for TCT Build/Install/Execution using Address Sanitizer
4 ================================================================================================
5
6
7 =====================================Description================================================
8 TCT Facilitates executing any itc/ctc/utc module using Address Sanitizer (ASAN).
9 Tizen 3.0 frameworks are mainly implemented in unmanaged programming languages (C and C++) which do not provide any protection against invalid memory accesses.
10 Such accesses often result in memory corruption and eventually cause program crashes or other abnormal behavior.
11 AddressSanitizer (or ASan for short) is a part of Google toolsuite for program quality assurance. The advantages of ASan are 
12  - much (~40x) faster than valgrind 
13  - actively evolving (in contrast to mudflap which has been recently removed from GCC) 
14  - cross-platform (in contrast to Intel MPX) 
15
16 Current AddressSanitizer handles the following classes of errors
17  - use after free 
18  - buffer overruns and wild pointers 
19  - use after return / use after end-of-block 
20  - initialization order bugs 
21 ================================================================================================
22  
23
24 =====================Build/Install/Execution Steps for any TCT Module==========================
25 a) ./scripts/init.sh
26 b) Build TCT module : 
27         $ sudo ./tcbuild build_asan <build_type> <module_name> [arch_type] [device_type]        (for device build)
28         $ sudo ./tcbuildsdk build_asan <build_type> <module_name> [arch_type] [device_type]     (for emulator build)
29 c) Install TCT Module : 
30         $ sudo ./tcbuild install_asan<build_type> <module_name> [arch_type] [device_type]       (for device install)
31         $ sudo ./tcbuildsdk install_asan <build_type> <module_name> [arch_type] [device_type]   (for emulator install)
32                 <build_type> = itc|ctc|utc
33         <arch_type> = armv7l/aarch64” (for tcbuild) and “i586/x86_64” (for tcbuildsdk)
34         <device_type> = mobile|wearable|tv
35 d) Execute using tct-manager tool.
36
37 Note:
38 a.) To build/install all the packages (itc+ctc+utc for all modules), exclude <build_type> and <module_name> from command as mention below: 
39     $ sudo ./tcbuild build_asan [arch_type] [device_type]       (build all for device)
40     $ sudo ./tcbuild install_asan [arch_type] [device_type] (install all for device)
41 b.) To build/install all the packages for specific build_type, (itc or ctc or utc), exclude <module_name> from command as mention below: 
42     $ sudo ./tcbuild build_asan <build_type> [ arch_type] [device_type]         (build for specific build_type for device)
43     $ sudo ./tcbuild install_asan <build_type> [ arch_type] [device_type]       (install for specific build_type for device)
44 ================================================================================================
45
46
47 =====================================Troubleshooting===============================================
48 For any troubleshooting, please contact its developer: Satyajit Anand (satyajit.a@samsung.com)
49 ===================================================================================================