Summary: | Invalid XML output when tracing into forked child processes | ||
---|---|---|---|
Product: | [Developer tools] valgrind | Reporter: | Matt Blythe <mblythester> |
Component: | memcheck | Assignee: | Julian Seward <jseward> |
Status: | REPORTED --- | ||
Severity: | normal | CC: | andykras, ivosh |
Priority: | NOR | ||
Version: | 3.10.0 | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: | fork.patch brought forward to valgrind 3.11 |
Description
Matt Blythe
2015-08-06 20:27:39 UTC
I hit the same issue and observed that it applies to both --log-file and --xml-file and that the issue exists in valgrind version 3.11. I brought the patch at the link below forward to version 3.11 and it seems to address the issue. https://chromium.googlesource.com/chromium/src/tools/valgrind/+/77eb74bd17f76978be25436f17025a29ba3b9a1f/fork.patch I'm not sure the valgrind developers would accept this patch as is because it seems just a tiny bit messy in incidental ways (e.g. print_preamble() declaration probably belongs in a header file, VG_(reopen_fd) may not really belong in m_main.c, etc...) but the basic notion of closing the original file and opening a new on in the child side atfork function seems sound. In any case, I will attach the revised version of the patch I applied to my local valgrind v3.11 build to this bug report. Created attachment 96840 [details]
fork.patch brought forward to valgrind 3.11
This is probably fixed with the fix for bug 162848. Please report if Valgrind built from latest sources works for you. |