--- /dev/null
+
+=================================================================
+==3298==ERROR: LeakSanitizer: detected memory leaks
+
+Direct leak of 596 byte(s) in 35 object(s) allocated from:
+ #0 0xb470d6a2 (/opt/usr/globalapps/org.example.common_lsan/bin/common_lsan+0x6a2)
+ #1 0x800c2d7d (/usr/bin/launchpad-loader+0x2d7d)
+ #2 0x800c912a (/usr/bin/launchpad-loader+0x912a)
+ #3 0x800c29ce (/usr/bin/launchpad-loader+0x29ce)
+ #4 0xb6a50187 (/lib/libc.so.6+0x18187)
+
+Direct leak of 16 byte(s) in 1 object(s) allocated from:
+ #0 0xb470d64a (/opt/usr/globalapps/org.example.common_lsan/bin/common_lsan+0x64a)
+ #1 0xb470d683 (/opt/usr/globalapps/org.example.common_lsan/bin/common_lsan+0x683)
+ #2 0x800c2d7d (/usr/bin/launchpad-loader+0x2d7d)
+ #3 0x800c912a (/usr/bin/launchpad-loader+0x912a)
+ #4 0x800c29ce (/usr/bin/launchpad-loader+0x29ce)
+ #5 0xb6a50187 (/lib/libc.so.6+0x18187)
+
+Direct leak of 15 byte(s) in 1 object(s) allocated from:
+ #0 0xb470d634 (/opt/usr/globalapps/org.example.common_lsan/bin/common_lsan+0x634)
+ #1 0xb470d683 (/opt/usr/globalapps/org.example.common_lsan/bin/common_lsan+0x683)
+ #2 0x800c2d7d (/usr/bin/launchpad-loader+0x2d7d)
+ #3 0x800c912a (/usr/bin/launchpad-loader+0x912a)
+ #4 0x800c29ce (/usr/bin/launchpad-loader+0x29ce)
+ #5 0xb6a50187 (/lib/libc.so.6+0x18187)
+
+SUMMARY: LeakSanitizer: 627 byte(s) leaked in 37 allocation(s).
:maxdepth: 2
:caption: Contents:
-**SWAP Protocol 4.2**
+**SWAP Protocol 5.0**
.. contents::
:depth: 4
+======================================+========+=========================+================================+========================================================+
| MSG\_UNKNOWN\_ACK | 0x1000 | return ID | no payload | unknown message received |
+--------------------------------------+--------+-------------------------+--------------------------------+--------------------------------------------------------+
-| MSG\_VERSION\_ACK | 0x1001 | return ID | version string | reply version, current version is "4.2" |
+| MSG\_VERSION\_ACK | 0x1001 | return ID | version string | reply version, current version is "5.0" |
+--------------------------------------+--------+-------------------------+--------------------------------+--------------------------------------------------------+
| MSG\_START\_ACK | 0x1002 | return ID | profiling start time | time when the swap\_deamon send |
| | | | | the MSG\_START\_ACK |
+==================+========+=========+==================================================================================================+
| status | uint32 | 0,1,2,4 | | 0x0 - LSAN\_MSG\_ERR, |
| | | | | 0x1 - LSAN\_MSG\_STATUS, |
-| | | | | 0x2 - LSAN\_MSG\_REPORT, |
+| | | | | 0x2 - LSAN\_MSG\_REPORT, see :ref:`lsan_report` |
| | | | | 0x4 - LSAN\_MSG\_DONE |
+------------------+--------+---------+--------------------------------------------------------------------------------------------------+
| pid | uint32 | pid | process id |
| | | | ELM\_WIN\_TIZEN\_WIDGET = 0x11, |
| | | | ELM\_WIN\_FAKE = 0x12 |
+-------------------------------------+--------+--------------------------------------------------------------------------------------------------+
+
+********
+Appendix
+********
+
+.. _lsan_report:
+
+LSan report
+===========
+
+Format
+------
+Backtrace format:
+
+``' #%n %p %L'``
+ | ``%n`` - frame number
+ | ``%p`` - PC in hex format
+ | ``%L`` - prints location information: file/line/column, if it is known, or module+offset if it is known, or (<unknown module>) string.
+
+Memory leaks can be **Direct** or **Indirect**.
+
+Example
+-------
+.. include:: lsan_example.log
+ :literal: