You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
making a simple example and running it with asan, i see that even though i free all sessions using Noise_XK_session_free() and then all devices using Noise_XK_device_free() some memory leaks that is allocated by noise-star, it seems the biggest culprit is the peers, but it also seems that the device serialization key (sk) is not freed in Noise_XK_device_free()
==13784==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 216 byte(s) in 9 object(s) allocated from:
#0 0x55ce3d2ff9cf in __interceptor_malloc (src/test+0xbc9cf) (BuildId: cfcdfcff81501c2bb9e6d42569c83ce41bc5e6ea)
#1 0x7fa80bcd32a2 in Noise_XK_device_add_peer src/XK.c:907
Direct leak of 96 byte(s) in 3 object(s) allocated from:
#0 0x55ce3d2ff3a7 in __interceptor_calloc (src/test+0xbc3a7) (BuildId: cfcdfcff81501c2bb9e6d42569c83ce41bc5e6ea)
#1 0x7fa80bcd2c1f in Noise_XK_device_create src/XK.c:429
#2 0x55ce3d24c835 in main src/test.c:705
#3 0x7fa80ba0e6c9 in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
Indirect leak of 288 byte(s) in 9 object(s) allocated from:
#0 0x55ce3d2ff3a7 in __interceptor_calloc (src/test+0xbc3a7) (BuildId: cfcdfcff81501c2bb9e6d42569c83ce41bc5e6ea)
#1 0x7fa80bcd323f in Noise_XK_device_add_peer src/XK.c:854
Indirect leak of 108 byte(s) in 9 object(s) allocated from:
#0 0x55ce3d2ff3a7 in __interceptor_calloc (src/test+0xbc3a7) (BuildId: cfcdfcff81501c2bb9e6d42569c83ce41bc5e6ea)
#1 0x7fa80bcd334c in Noise_XK_device_add_peer src/XK.c:880
Indirect leak of 72 byte(s) in 9 object(s) allocated from:
#0 0x55ce3d2ff9cf in __interceptor_malloc (src/test+0xbc9cf) (BuildId: cfcdfcff81501c2bb9e6d42569c83ce41bc5e6ea)
#1 0x7fa80bcd3292 in Noise_XK_device_add_peer src/XK.c:902
The text was updated successfully, but these errors were encountered:
stef
changed the title
memory leak in via peers in devices?
memory leak in devices via peers (and sk)
Jun 18, 2024
making a simple example and running it with asan, i see that even though i free all sessions using
Noise_XK_session_free()
and then all devices usingNoise_XK_device_free()
some memory leaks that is allocated by noise-star, it seems the biggest culprit is the peers, but it also seems that the device serialization key (sk
) is not freed inNoise_XK_device_free()
The text was updated successfully, but these errors were encountered: