Sfoglia il codice sorgente

Fix error handling threadz legacy profiles

A Go redefinition error causes pprof to skip parsing profile mappings.
Raul Silvera 9 anni fa
parent
commit
7d7ed67f71
1 ha cambiato i file con 2 aggiunte e 1 eliminazioni
  1. 2
    1
      profile/legacy_profile.go

+ 2
- 1
profile/legacy_profile.go Vedi File

@@ -983,7 +983,8 @@ func parseAdditionalSections(l string, b *bytes.Buffer, p *Profile) (err error)
983 983
 			break
984 984
 		}
985 985
 		// Ignore any unrecognized sections.
986
-		if l, err := b.ReadString('\n'); err != nil {
986
+		var err error
987
+		if l, err = b.ReadString('\n'); err != nil {
987 988
 			if err != io.EOF {
988 989
 				return err
989 990
 			}