Skip to content

cmd/compile: (more) bad pcln entries when compiling type parametric functions #49523

@aarzilli

Description

@aarzilli

I found one more issue like #49436 so I decided to write a program to find all of them. The program is https://github.com/aarzilli/badlngenerics/.

When run with test/typeparam/*.go it produces https://gist.github.com/aarzilli/7c4ba1e87e986f0ec1a89cdec455392a as output. The output format is

append.go:29 0x454e8d main._Append

which means that after compiling append.go with -gcflags='-N -l' instruction 0x454e8d, which belongs to an instantiation of main._Append, is assigned to line 29 of append.go, which happens to be outside of the body of main._Append in the source file.

Some of the output could be false positives but I've spot-checked some of it and it looks like it's detecting real problems.
There's a few of them.

Tested with:

go version devel go1.18-c49627e81b Thu Nov 11 11:47:33 2021 +0000 linux/amd64

cc @dr2chase

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.okay-after-beta1Used by release team to mark a release-blocker issue as okay to resolve either before or after beta1

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions