-
Notifications
You must be signed in to change notification settings - Fork 33
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
[Bug]: Segfault using emulation #1080
Comments
A call to |
The reason why It should NOT segfault. It should return an error. That seems to be an issue with emulation. The address that the static exec is built for is 0x00400000. The emulator is loaded at this address. It appears to be static, not optional. From the map file: |
Code in the static loader has been updated to remove the use of the MAP_FIXED flag. This works around the issue in the emulator that causes a segfault. We check to see that the address that was mapped is what is expected. If not, it is an error. The scope and ldscope commands should recognize this error and allow the static exec to run unscoped. |
It works as expected without a segfault: |
terraform, dynamic, go 1.18, x86_64, ubuntu, M1 Mac, arm64 works $ Your version of Terraform is out of date! The latest version $ |
Steps To Reproduce
on an M1 Mac
install docker (or multipass with docker on a headless M1 Mac)
run an x86_64 Linux container on the M1
emulation will be enabled such that x86_64 code will run on the arm64 arch of the M1
install terraform (or any Go static exec)
ldscope terraform -h
it has the possibility of a segfault
Environment
Requested priority
No response
Relevant log output
No response
The text was updated successfully, but these errors were encountered: