Verified by manually enabling debug mode and running make.bash.
Fixes #20684.
Change-Id: I041f2ca6ef1d4198815724d98f61511072d63581
Reviewed-on: https://go-review.googlesource.com/45971
Run-TryBot: Robert Griesemer <gri@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
func (p *exporter) path(s string) {
if i, ok := p.pathIndex[s]; ok {
- p.index('p', i) // i >= 0
+ // Note: Using p.index(i) here requires the use of p.tag(-len(c)) below
+ // to get matching debug markers ('t'). But in trace mode p.tag
+ // assumes that the tag argument is a valid tag that can be looked
+ // up in the tagString list, rather then some arbitrary slice length.
+ // Use p.int instead.
+ p.int(i) // i >= 0
return
}
p.pathIndex[s] = len(p.pathIndex)
}
func (p *importer) path() string {
- if p.debugFormat {
- p.marker('p')
- }
// if the path was seen before, i is its index (>= 0)
// (the empty string is at index 0)
- i := p.rawInt64()
+ i := p.int()
if i >= 0 {
return p.pathList[i]
}