XShmQueryExtension, valgrind and a "still reachable" block.

Antonio Ospite ospite at studenti.unina.it
Fri Mar 16 09:19:27 PDT 2012


Hi,

with the attached simple program I can always see that calling
XShmQueryExtension makes valgrind report a "still reachable" block:

$ valgrind --leak-check=full \
  --show-reachable=yes ./XShmQueryExtension_test

...
==27577== 24 bytes in 1 blocks are still reachable in loss record 1 of 1
==27577==    at 0x402894D: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==27577==    by 0x4A30AFD: XextCreateExtension (in /usr/lib/x86_64-linux-gnu/libXext.so.6.4.0)
==27577==    by 0x4A305A4: ??? (in /usr/lib/x86_64-linux-gnu/libXext.so.6.4.0)
==27577==    by 0x4A3091C: ??? (in /usr/lib/x86_64-linux-gnu/libXext.so.6.4.0)
==27577==    by 0x4A30D31: XextAddDisplay (in /usr/lib/x86_64-linux-gnu/libXext.so.6.4.0)
==27577==    by 0x4A2B5B8: XShmQueryExtension (in /usr/lib/x86_64-linux-gnu/libXext.so.6.4.0)
==27577==    by 0x4006D5: main (in /home/ao2/WIP/am7xxx-play/tests/XShmQueryExtension_test)
...

Maybe this is intended and not an actual bug, but I wanted to ask
here for confirmation.
So, is this message OK or a symptom of an actual bug?

I tried taking a look to libXext to figure out what is going on, but I
still lack precise knowledge about what a Display is in this context
and how the extension mechanism works so it is hard for me.

Thanks,
   Antonio

-- 
Antonio Ospite
http://ao2.it

A: Because it messes up the order in which people normally read text.
   See http://en.wikipedia.org/wiki/Posting_style
Q: Why is top-posting such a bad thing?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: XShmQueryExtension_test.c
Type: text/x-csrc
Size: 504 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg/attachments/20120316/ec958acf/attachment.c>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg/attachments/20120316/ec958acf/attachment.pgp>


More information about the xorg mailing list