-
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
gccgo: arm64: programs built with the -static option crashed during runtime initialization #38742
Comments
This doesn't look like a gccgo bug. Almost all the code involved here is in C. You might try writing a C function that calls Using |
I wrote a c program using
|
In addition, I'm using gold linker.
|
I'm not seeing a lot of reason to think that this is a gccgo/GoLLVM problem at all. It sounds like the problem is elsewhere. |
Yes, it should not be a problem of Gollvm/Gccgo, it may be a problem with the ld.gold linker, because no matter what compiler I use, as long as the ld.gold linker is used, the program will crash. And it won't crash with ld or lld linker. I don't know if there is any difference between gold and other linkers in handling of unwind_backtrace. Gollvm's search for the gcc path is not completely correct, because it will not find the path according to the currently used gcc version, and gccgo will. I will send a patch to fix this issue. |
This may related to this gold issue https://bugs.chromium.org/p/chromium/issues/detail?id=437106, with |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
$ cat hello.go
go build -gccgoflags="-static -g -v" -x -a hello.go
What did you expect to see?
The program outputs "hello"
What did you see instead?
The crash happened here https://github.com/gcc-mirror/gcc/blob/df30ab70690d6088f367e74757f0b5dd6a2587e5/libgcc/unwind-dw2.c#L1593
I found this issue while looking at the issue #37257. It may be related to precise stack scan, but I haven't figured out why it happened?
/cc @ianlancetaylor /cc @cherrymui /cc @thanm
The text was updated successfully, but these errors were encountered: