valgrind suppression filter for RTI library

5 posts / 0 new
Last post
mpichini's picture
Offline
Last seen: 8 months 2 weeks ago
Joined: 09/16/2015
Posts: 27
valgrind suppression filter for RTI library

Hi there,

I usually run valgrind to detect memory leaks in my applications. The problem is that valgrind reports tons of (I guess false positive) errors/warnings against RTI Connext DDS libraries.

I was wondering if there's someone that created a suppression filter for valgrind to exclude from the check RTI functions and libraries.ù

Best regards

Massimo

Offline
Last seen: 2 months 2 weeks ago
Joined: 04/02/2013
Posts: 194

Hi Massimo,

Could you copy here the call stack of a few of the leaks you're seeing?

Alex

mpichini's picture
Offline
Last seen: 8 months 2 weeks ago
Joined: 09/16/2015
Posts: 27

Hello Alejandro,

I've attached the valgrind report to this comment.

Massimo

Offline
Last seen: 2 months 2 weeks ago
Joined: 04/02/2013
Posts: 194

I think those memory leaks are in the singleton DomainParticipantFactory. If you want to free this memory before your application exits, you can use DomainParticipant::finalize_participant_factory(). Note that this is a static method in the DomainParticipant because the Modern C++ API doesn't expose a explicit DomainParticipantFactory class, unlike the other language APIs.

This leak is not really an issue, because it only happens when the application exits, but the finalize() method is there precisely to avoid issues with memory profilers.

Let me know if that cleans up your valgrind report.

Alex

mpichini's picture
Offline
Last seen: 8 months 2 weeks ago
Joined: 09/16/2015
Posts: 27

Hello Alex,


you're right. I've added the call to the finalize method and this cleaned up all valgrind reports.

Thank you

Massimo