Skip to content
New issue

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

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

Already on GitHub? # to your account

Invalid Free causes parsing the valgrind output to fail #20

Closed
jfrimmel opened this issue Aug 26, 2019 · 3 comments · May be fixed by #67
Closed

Invalid Free causes parsing the valgrind output to fail #20

jfrimmel opened this issue Aug 26, 2019 · 3 comments · May be fixed by #67

Comments

@jfrimmel
Copy link
Owner

If you have an invalid free, cargo-valgrind currently exits with an error. This is due to a changed Valgrind XML:

<error>
  <unique>...</unique>
  <tid>...</tid>
  <kind>InvalidFree</kind>
  <what>Invalid free() / delete / delete[] / realloc()</what>
  <stack>...</stack>
  <auxwhat>Address 0x8c2b840 is 0 bytes inside a block of size 16 free'd</auxwhat>
  <stack>...</stack>
  <auxwhat>Block was alloc'd at</auxwhat>
  <stack>...</stack>
</error>

Note the multiple stack fields.

To resolve this error the stack Error structure has to be changed, so that it provides a vector of Stacks.
Since the valgrind_xml module is not public, the change won't not API breaking.

@jfrimmel
Copy link
Owner Author

At this point, the <auxwhat>-block should also be parsed and maybe presented to the user.

@jfrimmel
Copy link
Owner Author

This requires to parse either a Resources struct in case of <xwhat> or a String in case of what. The same applies for auxwhat/xauxwhat.
Refer to the serde documentation on that topic.

@jfrimmel
Copy link
Owner Author

This is fixed by #80.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant