https://bugs.kde.org/show_bug.cgi?id=514613
Bug ID: 514613
Summary: Unclosed leak_summary/still_reachable tag in xml
output
Classification: Developer tools
Product: valgrind
Version First 3.26.0
Reported In:
Platform: RedHat Enterprise Linux
OS: Linux
Status: REPORTED
Severity: normal
Priority: NOR
Component: memcheck
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: ---
SUMMARY
When running valgrind (memcheck) on an binary with a memory issue (e.g.
definitely lost, or still reachable) the still_reachable tag in the
leak_summary section is not closed. This was observed with valgrind 3.26.0 and
3.26.1 releases, but not with 3.25.1
STEPS TO REPRODUCE
1. Create simple leaky program: leak.c
#include <stdlib.h>
int main(int, char**)
{
int *p = malloc(sizeof(int));
return 0;
}
2. Build and valgrind
gcc foo.c -o foo && valgrind --leak-check=full --show-reachable=yes
--xml=yes --xml-fd=0 ./foo
OBSERVED RESULT
The leak summary has an unclosed still_reachable tag.
<leak_summary>
<definitely_lost>
<bytes>4</bytes>
<blocks>1</blocks>
</definitely_lost>
<indirectly_lost>
<bytes>0</bytes>
<blocks>0</blocks>
</indirectly_lost>
<possibly_lost>
<bytes>0</bytes>
<blocks>0</blocks>
</possibly_lost>
<still_reachable>
<bytes>0</bytes>
<blocks>0</blocks>
<suppressed>
<bytes>0</bytes>
<blocks>0</blocks>
</suppressed>
</leak_summary>
EXPECTED RESULT
The still_reachable tag should be closed, making the XML valid
<still_reachable>
<bytes>0</bytes>
<blocks>0</blocks>
</still_reachable>
SOFTWARE/OS VERSIONS
Linux/KDE Plasma: RedHat9
--
You are receiving this mail because:
You are watching all bug changes.