Skip to content
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

runtime: Add error message when running non GOAMD64=v1 on unsupported hardware #48506

martisch opened this issue Sep 21, 2021 · 1 comment


Copy link

@martisch martisch commented Sep 21, 2021

With #45453 we are introducing GOAMD64 to build binaries that are not supported on all amd64 machines.

This can lead to an illegal instruction exception when running such a binary.

We should make best effort to report when such a binary with GOAMD64 > v1 is run on unsupported hardware.

One way to check is to add some assembly early in the runtime startup like it is done to detect MMX on 386 and print a short error message then exit the go program:

TESTL $(1<<23), DX // MMX

Waiting for internal/cpu to initialise to then do the minimum hardware checks in go code is likely to late as by that time an instruction that was emitted by the go compiler could have been used that already is unsupported.

/cc @mdempsky @randall77

Copy link

@gopherbot gopherbot commented Sep 24, 2021

Change mentions this issue: runtime: check amd64 microarchitecture level at startup

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants