Bug 253308 - --log-file and --xml-file dont work well with --trace-children=yes
Summary: --log-file and --xml-file dont work well with --trace-children=yes
Status: RESOLVED DUPLICATE of bug 162848
Alias: None
Product: valgrind
Classification: Developer tools
Component: general (show other bugs)
Version: 3.6 SVN
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Julian Seward
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-05 12:56 UTC by Christian Borntraeger
Modified: 2024-01-12 21:01 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
sample script that misbehaves with valgrind --trace-children=yes --log-file=... (61 bytes, patch)
2010-10-05 12:56 UTC, Christian Borntraeger
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Borntraeger 2010-10-05 12:56:20 UTC
Created attachment 52230 [details]
sample script that misbehaves with valgrind --trace-children=yes --log-file=...

Version:           3.6 SVN
OS:                Linux

--log-file and --xml-file blindly create (or overwrite) the existing file. This is usually ok, but will fail with --trace-children=yes in two ways:
1. only a subset or nothing is logged
2. if the program changes into a non-writable directory the child program isnt executed at all

I attached a simple shell script that behaves differently under valgrind.


I am willing to fix this but I am not really sure what is the best way:
1. disallow --log-file and --xml-file with --trace-children
2. pass the file descriptor somehow to the children
3. any other idea

Reproducible: Always




Credits: This was found during system test on s390x by Stefan Wild.
Comment 1 Timur Iskhodzhanov 2011-02-15 18:06:09 UTC
Hi Christian,

I think this is a dup of https://bugs.kde.org/show_bug.cgi?id=162848
See my recent comment there - we've already fixed that in valgrind-variant, you may give it a try.
Comment 2 Mark Wielaard 2024-01-12 13:59:22 UTC

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