Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Memcheck minor changes #16

Merged
merged 3 commits into from
Dec 15, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
84 changes: 82 additions & 2 deletions lib/flowbber/plugins/sources/valgrind/memcheck.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,89 @@
.. code-block:: json

{
"FIXME": "FIXME"
"status":[
{
"state":"RUNNING",
"time":"00:00:00:00.268"
},
{
"state":"FINISHED",
"time":"00:00:00:59.394"
}
],
"ppid":"4242",
"preamble":{
"line":[
"Memcheck, a memory error detector",
"Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.",
"Using Valgrind-3.11.0 and LibVEX; rerun with -h for copyright info",
"Command: ./binary"
]
},
"suppcounts":{
"pair":[
{
"name":"reachable memory from libstdc++ pool",
"count":"1"
}
]
},
"pid":"424242",
"errorcounts":null,
"protocoltool":"memcheck",
"protocolversion":"4",
"tool":"memcheck",
"error":[
{
"kind":"Leak_DefinitelyLost",
"stack":{
"frame":[
{
"obj":"/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so",
"ip":"0x4C2FB55",
"fn":"calloc"
},
{
"dir":"/home/library",
"obj":"/home/library/binary",
"line":"76",
"ip":"0xED467F",
"fn":"hello_world()",
"file":"hello.cpp"
},
]
},
"xwhat":{
"leakedblocks":"1",
"text":"8 bytes in 1 blocks are definitely lost in loss record 1 of 5",
"leakedbytes":"8"
},
"tid":"1",
"unique":"0x0"
}
],
"args":{
"vargv":{
"exe":"/usr/bin/valgrind.bin",
"arg":[
"--track-origins=yes",
"--leak-check=full",
"--show-leak-kinds=all",
"--errors-for-leak-kinds=definite",
"--error-exitcode=1",
"--xml=yes",
"--xml-file=memcheck.xml",
"--suppressions=/home/library/suppressions.supp"
]
},
"argv":{
"exe":"./binary",
"arg":[]
}
}
}


**Dependencies:**

.. code-block:: sh
Expand Down Expand Up @@ -112,7 +192,7 @@ def collect(self):
'No such file {}'.format(infile)
)

doc = parse(infile.read_text())
doc = parse(infile.read_text(), force_list=('error',))
return doc['valgrindoutput']


Expand Down
2 changes: 1 addition & 1 deletion requirements.dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ ipdb
# Testing #
#######################

pytest
pytest==3.2.5
pytest-cov

#######################
Expand Down