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

panic: Unsupported architecture (ARM related?) #35

Closed
0xdevalias opened this issue Nov 28, 2023 · 5 comments
Closed

panic: Unsupported architecture (ARM related?) #35

0xdevalias opened this issue Nov 28, 2023 · 5 comments

Comments

@0xdevalias
Copy link

$ /opt/homebrew/Cellar/redress/1.1.1/bin/redress info /opt/homebrew/Cellar/redress/1.1.1/bin/redress
panic: Unsupported architecture

goroutine 1 [running]:
github.com/goretk/gore.(*machoFile).getFileInfo(0x1400002c4a0)
	github.com/goretk/[email protected]/macho.go:117 +0xdc
github.com/goretk/gore.Open({0x16f1e6a84, 0x2e})
	github.com/goretk/[email protected]/file.go:86 +0x348
main.listInfo({0x16f1e6a84?, 0x0?})
	github.com/goretk/redress/info.go:50 +0x90
main.init.1.func1(0x140000e6e00?, {0x1400002c300?, 0x4?, 0x100e4f6df?})
	github.com/goretk/redress/info.go:25 +0x30
github.com/spf13/cobra.(*Command).execute(0x140000c4280, {0x1400002c2e0, 0x1, 0x1})
	github.com/spf13/[email protected]/command.go:860 +0x53c
github.com/spf13/cobra.(*Command).ExecuteC(0x1010dd2c0)
	github.com/spf13/[email protected]/command.go:974 +0x318
github.com/spf13/cobra.(*Command).Execute(...)
	github.com/spf13/[email protected]/command.go:902
main.main()
	github.com/goretk/redress/main.go:25 +0x24

Potentially related:

Background Context

I believe the below is related to this issue (adding here particularly for context of error messages/etc since this issue didn't show up when I searched originally):


$ /opt/homebrew/Cellar/redress/1.1.1/bin/redress info /opt/homebrew/Cellar/redress/1.1.1/bin/redress
panic: Unsupported architecture

goroutine 1 [running]:
github.com/goretk/gore.(*machoFile).getFileInfo(0x1400002c4a0)
	github.com/goretk/[email protected]/macho.go:117 +0xdc
github.com/goretk/gore.Open({0x16f1e6a84, 0x2e})
	github.com/goretk/[email protected]/file.go:86 +0x348
main.listInfo({0x16f1e6a84?, 0x0?})
	github.com/goretk/redress/info.go:50 +0x90
main.init.1.func1(0x140000e6e00?, {0x1400002c300?, 0x4?, 0x100e4f6df?})
	github.com/goretk/redress/info.go:25 +0x30
github.com/spf13/cobra.(*Command).execute(0x140000c4280, {0x1400002c2e0, 0x1, 0x1})
	github.com/spf13/[email protected]/command.go:860 +0x53c
github.com/spf13/cobra.(*Command).ExecuteC(0x1010dd2c0)
	github.com/spf13/[email protected]/command.go:974 +0x318
github.com/spf13/cobra.(*Command).Execute(...)
	github.com/spf13/[email protected]/command.go:902
main.main()
	github.com/goretk/redress/main.go:25 +0x24

is this only for x86?

Originally posted by @chenrui333 in Homebrew/homebrew-core#155724 (comment)


That seems to be coming from the gore lib that redress depends on:

https://github.com/goretk/gore/blob/78568206ae24043a24fc8bf89443ad6164a7509f/macho.go#L104-L123


What system were you trying to run it on?

Originally posted by @0xdevalias in Homebrew/homebrew-core#155724 (comment)


I am trying on ventura arm, if does not run for arm, then we probably need depends_on arch: :x86_64 as well as some upstream note on it

Originally posted by @chenrui333 in Homebrew/homebrew-core#155724 (comment)

Originally posted by @0xdevalias in goretk/gore#21 (comment)

I suspect this issue may be related:

Though based on that, I believe that the CLI can be compiled and run fine on ARM, it just can't process Golang binaries compiled for ARM currently.

@chenrui333 Are you able to confirm by running your local arm compiled version against one of the presumably non-ARM release versions (or any other non-ARM Golang binary)?

If that works.. then I guess we just need to figure out a better way to implement the test on ARM systems. Any ideas?

Originally posted by @0xdevalias in Homebrew/homebrew-core#155724 (comment)

@TcM1911
Copy link
Member

TcM1911 commented Dec 4, 2023

Please check if it's still an issue with the latest release.

@0xdevalias
Copy link
Author

Please check if it's still an issue with the latest release

@TcM1911 From a quick initial test, I don't think so. I'm running the original test that failed currently, so will check if that works.

Looking at the commit changes, I didn't see where/how this would have been fixed though. Are you able to elaborate on where the expected fix came from?

I'm guessing it was probably this one:

  • 058070b
    • Sync with gore develop branch

Along with this?

@0xdevalias
Copy link
Author

@TcM1911 My full test also passed, so I would say this works now:

@TcM1911
Copy link
Member

TcM1911 commented Dec 6, 2023

Analyzing ARM binaries isn't currently fully supported. That patch added arm64 just to prevent crashes... The "basic" functionality should at least work.

@TcM1911 TcM1911 closed this as completed Dec 6, 2023
@0xdevalias
Copy link
Author

Analyzing ARM binaries isn't currently fully supported. That patch added arm64 just to prevent crashes... The "basic" functionality should at least work.

@TcM1911 That makes sense. Thanks for that :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants