Hi,
we are seeing memory leak when a Wayland client process using wayland-egl is executed.
For example, weston-simple-egl, /usr/bin/SGX/demos/Wayland/OGLES2ChameleonMan.
Valgrind shows us these memory leak as below,
==1206== 8 bytes in 1 blocks are definitely lost in loss record 1 of 7
==1206== at 0x4847988: malloc (vg_replace_malloc.c:299)
==1206== by 0x4D1552B: PVRSRVCreateAppHintState (in /usr/lib/libsrv_um.so.1.17.4948957)
==1206==
==1206== 12 bytes in 1 blocks are indirectly lost in loss record 2 of 7
==1206== at 0x4847988: malloc (vg_replace_malloc.c:299)
==1206== by 0x4948FE1: wl_display_create_queue (in /usr/lib/libwayland-client.so.0.3.0)
==1206==
==1206== 32 bytes in 1 blocks are still reachable in loss record 3 of 7
==1206== at 0x4847988: malloc (vg_replace_malloc.c:299)
==1206== by 0x4D16C73: PVRSRVCreateDeferredTask (in /usr/lib/libsrv_um.so.1.17.4948957)
==1206==
==1206== 40 bytes in 1 blocks are definitely lost in loss record 4 of 7
==1206== at 0x484A5A8: calloc (vg_replace_malloc.c:752)
==1206== by 0x4949C33: wl_proxy_create_wrapper (in /usr/lib/libwayland-client.so.0.3.0)
==1206==
==1206== 52 (40 direct, 12 indirect) bytes in 1 blocks are definitely lost in loss record 5 of 7
==1206== at 0x484A5A8: calloc (vg_replace_malloc.c:752)
==1206== by 0x4948E53: ??? (in /usr/lib/libwayland-client.so.0.3.0)
==1206==
==1206== 120 bytes in 3 blocks are still reachable in loss record 6 of 7
==1206== at 0x484A5A8: calloc (vg_replace_malloc.c:752)
==1206== by 0x4948E53: ??? (in /usr/lib/libwayland-client.so.0.3.0)
==1206==
==1206== 2,076 bytes in 1 blocks are still reachable in loss record 7 of 7
==1206== at 0x484A5A8: calloc (vg_replace_malloc.c:752)
==1206== by 0x4E01675: drmHashCreate (in /usr/lib/libdrm.so.2.4.0)
==1206==
==1206== LEAK SUMMARY:
==1206== definitely lost: 88 bytes in 3 blocks
==1206== indirectly lost: 12 bytes in 1 blocks
==1206== possibly lost: 0 bytes in 0 blocks
==1206== still reachable: 2,228 bytes in 5 blocks
==1206== suppressed: 0 bytes in 0 blocks
We have attached the full result of valgrind.
weston-simple-egl-valgrind-20210312-am335x-evm.log
OGLES2-ChameleonMan-valgrind-20210312-am335x-evm.log
Do you have any idea to solve this?
Hardware:
am335x-evm
Software:
PROCESSOR-SDK-LINUX-AM335X 06_01_00_08.
Thank you.