Debug messages

Dscuss uses GLib's g_debug to print debug messages. Debug messages are suppressed by default, in order to make Glib print them, set the following environment variable:



Typical command line for running Dscuss under Valgrind is the following:

G_DEBUG=gc-friendly G_SLICE=always-malloc \
valgrind --suppressions=gst.supp --leak-check=full ./dscuss

G_DEBUG=gc-friendly and G_SLICE=always-malloc help to get rid of some possibly lost messages coming from GLib. However, it will not suppress all of them. Valgrind's suppression file seems to be the only way to clear them all. Here is the GStreamer's suppression file, which contains all the necessary rules.

Do NOT use --show-possibly-lost=no, because it may hide actual bugs in Dscuss.

Besides that, OpenSSL has to be compiled with -DPURIFY, as explained here. Otherwise Valgrind will complain about uninitialized data usage:

==20768== Conditional jump or move depends on uninitialised value(s)
==20768==    at 0x57BBBD2: BN_bin2bn (in /usr/lib64/
==20768==    by 0x57BF7EE: bnrand.part.0 (in /usr/lib64/
==20768==    by 0x57BF51F: bn_rand_range (in /usr/lib64/
==20768==    by 0x57D5ECA: EC_KEY_generate_key (in /usr/lib64/
==20768==    by 0x404C2A: dscuss_crypto_init (crypto.c:61)
==20768==    by 0x4036DE: dscuss_init (api.c:125)
==20768==    by 0x403152: main (main.c:150)

==20768== Use of uninitialised value of size 8
==20768==    at 0x57BB54A: BN_num_bits_word (in /usr/lib64/
==20768==    by 0x57BB632: BN_num_bits (in /usr/lib64/
==20768==    by 0x57D53E7: i2d_ECPrivateKey (in /usr/lib64/
==20768==    by 0x582BF13: PEM_ASN1_write_bio (in /usr/lib64/
==20768==    by 0x582DC25: PEM_write_bio_ECPrivateKey (in /usr/lib64/
==20768==    by 0x404CB2: dscuss_crypto_init (crypto.c:75)
==20768==    by 0x4036DE: dscuss_init (api.c:125)
==20768==    by 0x403152: main (main.c:150)