Valgrind Errors

Ask software engineering and SDK questions for developers working on Mac OS X, Windows or Linux.
  • Author
  • Message
Offline

Tim Philip

  • Posts: 5
  • Joined: Thu Feb 09, 2017 4:47 am

Valgrind Errors

PostSat Aug 26, 2017 4:16 am

As a matter of course I always check my Linux software using Valgrind. It complains about many errors in the Blackmagic libraries. I know that Valgrind is a bit strict and sometimes gets it wrong - the nVidia libraries always throw some errors due to their call structure rather inherent problems.

It'd be nice if the Blackmagic libraries didn't throw a constant stream of Valgrind errors. Is there a set of rules to ignore all the errors? Or better yet any plan to stop the BlackMagic Linux libraries from throwing these error messages?
Offline

Andres Gonzalez

  • Posts: 23
  • Joined: Tue Apr 21, 2015 2:05 am

Re: Valgrind Errors

PostThu Aug 31, 2017 7:39 pm

Hi Tim,

I agree. It is very frustrating using valgrind when the 3rd party libraries are not valgrind clean. It has been a while since I have reviewed the following, and I am not sure how specific it is to my own linux development environment, but the following is what I used in my .supp file in an attempt to suppress some of the decklink API valgrind chatter:

Code: Select all
{
    <decklink-cond>
    Memcheck:Cond
    ...
    obj:/usr/lib/libDeckLinkAPI.so
}
{   
    <decklink-value8>
    Memcheck:Value8
    ...
    obj:/usr/lib/libDeckLinkAPI.so
}
{
    <decklink-input>
    Memcheck:Leak
    match-leak-kinds: reachable
    fun:_Znwm
    fun:_ZN9CDeckLink14QueryInterfaceE6REFIIDPPv
    fun:_ZN15SystemResources27findAllInputDeckLinkDevicesEv
}
{
    <decklink-input2>
    Memcheck:Leak
    match-leak-kinds: reachable
    fun:_Znwm
    fun:_ZN14DeckControlLib11DeckControlC1EP12CDeckControlP15VTRSerialDevicebP28DeckControlHardwareInterface
    fun:_ZN12CDeckControlC1EP9CDeckLinkP28DeckControlHardwareInterfaceP15pthread_mutex_t
    fun:_ZN9CDeckLink14QueryInterfaceE6REFIIDPPv
    fun:_ZN9CDeckLink14QueryInterfaceE6REFIIDPPv
}
{
    <decklink-iterator>
    Memcheck:Leak
    match-leak-kinds: reachable
    fun:malloc
    fun:_Z18DeckLinkOpenDevicePK18DeckLinkDeviceNode
    fun:_Z20DeckLinkIteratorNextP19DeckLinkIteratorRec
    fun:ConnectToDriverCore
    fun:_ZN17CDeckLinkIterator4NextEPP9IDeckLink
}
{
    <decklink-card-iterator>
    Memcheck:Leak
    match-leak-kinds: reachable
    fun:_Znwm
    fun:_ZNSt11_Deque_baseI18DeckLinkDeviceNodeSaIS0_EE15_M_create_nodesEPPS0_S4_
    fun:_ZNSt11_Deque_baseI18DeckLinkDeviceNodeSaIS0_EE17_M_initialize_mapEm
    fun:CreateDeckLinkIterator
    fun:_ZN17CDeckLinkIteratorC1Ev
    fun:_Z35CreateDeckLinkIteratorInstance_Headv
}


Again, not sure if this is even useful for you but thought I would at least share what I have because I feel your pain also.

-Andres

Return to Software Developers

Who is online

Users browsing this forum: No registered users and 15 guests