-
Notifications
You must be signed in to change notification settings - Fork 17.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cmd/internal/obj: symbol redeclared panics during InitTextSym #68962
Labels
compiler/runtime
Issues related to the Go compiler and/or runtime.
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
Comments
y1yang0
added a commit
to y1yang0/go
that referenced
this issue
Aug 20, 2024
Now the linker reports the following error message /go/test/fixedbugs/issue68962.go:11:6: symbol main.c redeclared at /go/test/fixedbugs/issue68962.go:13:6 Fixes golang#68962
Change https://go.dev/cl/606903 mentions this issue: |
Stack trace:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
compiler/runtime
Issues related to the Go compiler and/or runtime.
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Go version
go1.24
Output of
go env
in your module/workspace:What did you do?
When compiling the automatically generated code(alibaba/opentelemetry-go-auto-instrumentation#52), a panic occurred:
reproduce:
further reduced:
stacktrace:
In reduced program, both
a
andc
have identical LSym, i.e.main.c
.When
a
has a body,setupTextLSym
is called for the first time, initializingLSym.Extra
atgo/src/cmd/internal/obj/plist.go
Line 189 in 7fcd4a7
Then, when processing
c
,setupTextLSym
is called again.s.Func().Text
was not initialized in the previous step bys.NewFuncInfo()
, leading to the below panicgo/src/cmd/internal/obj/plist.go
Line 186 in 7fcd4a7
What did you see happen?
compiler panic
What did you expect to see?
not panic
The text was updated successfully, but these errors were encountered: