[sr-dev] [kamailio/kamailio] Google Sanitizers: possible memory leaks (Issue #2892)

sergey-safarov notifications at github.com
Thu Oct 21 11:10:22 CEST 2021


### Description

I have compiled Kamailio with `MEMPKG=sys` param and Google Sanitizers.
Then started/stopped Kamailio with default config.
After Kamailio stopped the produced report below.

```
==8042==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 15872 byte(s) in 124 object(s) allocated from:
    #0 0x7f01775ed36f in __interceptor_malloc (/lib64/libasan.so.6+0xab36f)
    #1 0x1296835 in addstr core/cfg.lex:1605
    #2 0x129660e in addchar core/cfg.lex:1589
    #3 0x1287356 in yylex core/cfg.lex:1266
    #4 0x12be8c2 in yyparse core/cfg.tab.c:5508
    #5 0x466c2d in main /tmp/kamailio/src/main.c:2487
    #6 0x7f01768a91e1 in __libc_start_main (/lib64/libc.so.6+0x281e1)

Direct leak of 6784 byte(s) in 53 object(s) allocated from:
    #0 0x7f01775ed36f in __interceptor_malloc (/lib64/libasan.so.6+0xab36f)
    #1 0x1296835 in addstr core/cfg.lex:1605
    #2 0x12894c7 in yylex core/cfg.lex:1395
    #3 0x12be8c2 in yyparse core/cfg.tab.c:5508
    #4 0x466c2d in main /tmp/kamailio/src/main.c:2487
    #5 0x7f01768a91e1 in __libc_start_main (/lib64/libc.so.6+0x281e1)

Direct leak of 6104 byte(s) in 9 object(s) allocated from:
    #0 0x7f01775ed36f in __interceptor_malloc (/lib64/libasan.so.6+0xab36f)
    #1 0xbf1e09 in register_module core/sr_module.c:257
    #2 0xc0c31c in load_module core/sr_module.c:641
    #3 0x12d3b70 in yyparse core/cfg.y:1861
    #4 0x466c2d in main /tmp/kamailio/src/main.c:2487
    #5 0x7f01768a91e1 in __libc_start_main (/lib64/libc.so.6+0x281e1)
```
Full report [kamailio-sanitizer.log](https://github.com/kamailio/kamailio/files/7387628/kamailio-sanitizer.log)

### Additional Information
Compiled 1483ddb735c3fa3ea77b6e2d54ec67584e56e15b


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/2892
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-dev/attachments/20211021/9d776efa/attachment-0001.htm>


More information about the sr-dev mailing list