Description

I want debug memory usage by TLS module.
To do this used command

make -C src/modules/tls CFLAGS="-DTLS_MALLOC_DBG=1"

And this output

[root@sbc-stage-a0 kamailio]# make -C src/modules/tls CFLAGS="-DTLS_MALLOC_DBG=1" 
make: Entering directory '/root/bak/kamailio/src/modules/tls'
CC (gcc) [M tls.so]		tls_domain.o
CC (gcc) [M tls.so]		tls_rand.o
CC (gcc) [M tls.so]		tls_map.o
CC (gcc) [M tls.so]		tls_cfg.o
CC (gcc) [M tls.so]		tls_mod.o
CC (gcc) [M tls.so]		tls_util.o
CC (gcc) [M tls.so]		tls_config.o
CC (gcc) [M tls.so]		tls_server.o
CC (gcc) [M tls.so]		tls_select.o
CC (gcc) [M tls.so]		tls_dump_vf.o
CC (gcc) [M tls.so]		tls_init.o
tls_init.c:137:2: warning: #warning "tls module compiled with malloc debugging info (extra overhead)" [-Wcpp]
 #warning "tls module compiled with malloc debugging info (extra overhead)"
  ^~~~~~~
tls_init.c: In function ‘ser_malloc’:
tls_init.c:218:5: warning: implicit declaration of function ‘_shm_malloc’; did you mean ‘shm_malloc’? [-Wimplicit-function-declaration]
   p=_shm_malloc(size+s, file, "via ser_malloc", line);
     ^~~~~~~~~~~
     shm_malloc
tls_init.c:218:4: warning: assignment to ‘void *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
   p=_shm_malloc(size+s, file, "via ser_malloc", line);
    ^
tls_init.c:224:39: error: invalid application of ‘sizeof’ to incomplete type ‘struct qm_frag’
    ((struct qm_frag*)((char*)p-sizeof(struct qm_frag)))->func=
                                       ^~~~~~
tls_init.c: In function ‘ser_realloc’:
tls_init.c:253:5: warning: implicit declaration of function ‘_shm_realloc’; did you mean ‘shm_realloc’? [-Wimplicit-function-declaration]
   p=_shm_realloc(ptr, size+s, file, "via ser_realloc", line);
     ^~~~~~~~~~~~
     shm_realloc
tls_init.c:253:4: warning: assignment to ‘void *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
   p=_shm_realloc(ptr, size+s, file, "via ser_realloc", line);
    ^
tls_init.c:259:39: error: invalid application of ‘sizeof’ to incomplete type ‘struct qm_frag’
    ((struct qm_frag*)((char*)p-sizeof(struct qm_frag)))->func=
                                       ^~~~~~
tls_init.c: In function ‘tls_pre_init’:
tls_init.c:684:7: warning: implicit declaration of function ‘CRYPTO_set_mem_ex_functions’; did you mean ‘CRYPTO_set_mem_functions’? [-Wimplicit-function-declaration]
  if (!CRYPTO_set_mem_ex_functions(ser_malloc, ser_realloc, ser_free)) {
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~
       CRYPTO_set_mem_functions
tls_init.c:684:60: error: ‘ser_free’ undeclared (first use in this function); did you mean ‘sk_free’?
  if (!CRYPTO_set_mem_ex_functions(ser_malloc, ser_realloc, ser_free)) {
                                                            ^~~~~~~~
                                                            sk_free
tls_init.c:684:60: note: each undeclared identifier is reported only once for each function it appears in
make: *** [../../Makefile.rules:100: tls_init.o] Error 1
make: Leaving directory '/root/bak/kamailio/src/modules/tls'

Additional Information

kamailio 5.6.4 with some customisation


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <kamailio/kamailio/issues/3532@github.com>