@@ -17,6 +17,7 @@ import (
1717 "github.com/google/syzkaller/pkg/log"
1818 "github.com/google/syzkaller/pkg/mgrconfig"
1919 "github.com/google/syzkaller/pkg/osutil"
20+ "github.com/google/syzkaller/pkg/report"
2021 "github.com/google/syzkaller/prog"
2122)
2223
@@ -87,12 +88,22 @@ func (cs *CrashStore) SaveCrash(crash *Crash) (bool, error) {
8788 }
8889 writeOrRemove ("log" , crash .Output )
8990 writeOrRemove ("tag" , []byte (cs .Tag ))
90- writeOrRemove ("report" , crash .Report .Report )
91+ writeOrRemove ("report" , mergeReportBytes ( append ([] * report .Report { crash .Report }, crash . TailReports ... )) )
9192 writeOrRemove ("machineInfo" , crash .MachineInfo )
9293
9394 return first , nil
9495}
9596
97+ func mergeReportBytes (reps []* report.Report ) []byte {
98+ const reportSeparator = "\n <<<<<<<<<<<<<<< EOF report >>>>>>>>>>>>>>>\n "
99+ var res []byte
100+ for _ , rep := range reps {
101+ res = append (res , rep .Report ... )
102+ res = append (res , []byte (reportSeparator )... )
103+ }
104+ return res
105+ }
106+
96107func (cs * CrashStore ) HasRepro (title string ) bool {
97108 return osutil .IsExist (filepath .Join (cs .path (title ), reproFileName ))
98109}
0 commit comments