Bug 351536 - Valgrind should track map areas of unloaded libraries
Summary: Valgrind should track map areas of unloaded libraries
Status: RESOLVED DUPLICATE of bug 79362
Alias: None
Product: valgrind
Classification: Developer tools
Component: memcheck (show other bugs)
Version: 3.10.0
Platform: openSUSE Linux
: NOR wishlist
Target Milestone: ---
Assignee: Julian Seward
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-08-20 21:32 UTC by Thiago Macieira
Modified: 2015-08-20 21:38 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thiago Macieira 2015-08-20 21:32:02 UTC
Sometimes, an invalid memory access is caused by a library that has got unloaded, as in the following example:

==7557== Invalid read of size 4
==7557==    at 0xA8EBFE4: load<int> (qgenericatomic.h:83)
==7557==    by 0xA8EBFE4: QBasicAtomicInteger<int>::load() const (qbasicatomic.h:118)
[...]
==7557==  Address 0x17a73f80 is not stack'd, malloc'd or (recently) free'd

The report is correct, but it would have been more useful if the last line said:

==7557==  Address 0x17a73f80 is 0x73f80 bytes into unloaded library libQt5XcbQpa.so

Further wishes:
 1) display the backtrace of the dlclose(), which would be equivalent to free() for the regular memcheck functionality
 2) display the closest symbol in the library
Comment 1 Tom Hughes 2015-08-20 21:38:29 UTC

*** This bug has been marked as a duplicate of bug 79362 ***