fix(valgrind): use %p in log file path to avoid multi-process overwrite#381
Conversation
Merging this PR will not alter performance
|
Greptile SummaryFixes a multi-process log overwrite bug introduced by
Confidence Score: 5/5Safe to merge — the change is a targeted, low-risk fix that aligns the log-file naming convention with the existing out-file patterns. The No files require special attention. Important Files Changed
|
ce58003 to
31e39a0
Compare
Each (potentially forked) process now writes to its own valgrind.<pid>.log instead of clobbering a shared log file. On failure, dump these per-process logs via a dump_valgrind_logs helper when debug logging is enabled.
31e39a0 to
b1c5547
Compare
What?
With
--trace-children=yes, every (forked) process wrote to the samevalgrind.logfile, so the last writer won and earlier processes' logs were lost.This uses the
%p(PID) placeholder in--log-fileso each process gets its ownvalgrind.<pid>.log, matching the existing%p.out(callgrind) and%p.tgtrace(tracegrind) out-file patterns.Also drops the failure-path read of the now-nonexistent hardcoded
valgrind.log.Closes COD-2747