Skip to content

internal/profile: potential panic during PGO build due to nil Location in Sample #81290

Description

@nicholashusin

This was originally reported as a security issue. We do not believe that this is a vulnerability, and are therefore filing it as a regular bug.

Minimal repro in src/internal/profile/profile_test.go:

func TestParseDanglingLocationID(t *testing.T) {
	// Profile containing a sample referencing non-existent location ID 99.
	raw, _ := hex.DecodeString("3200320773616d706c65733205636f756e740a040801100212050a01631001")
	p, err := Parse(bytes.NewReader(raw))
	if err != nil {
		return // Expected failure
	}
	// If Parse accepted it, NewGraph should not panic.
	_ = NewGraph(p, &Nodes{})
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.compiler/runtimeIssues related to the Go compiler and/or runtime.

    Type

    No type

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions