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

Crashing on loading dylibs #74

Open
wajsic opened this issue Oct 1, 2021 · 3 comments
Open

Crashing on loading dylibs #74

wajsic opened this issue Oct 1, 2021 · 3 comments

Comments

@wajsic
Copy link

wajsic commented Oct 1, 2021

Hello! I am trying to inject a simple dylib but it looks like there is something wrong with patching

When attaching debugger right on launch I get the error "load commands exceed length of first segment"
Now doing some research it leads me to this line in Apple's dyld3 module which looks quite self-explanatory. Now has anyone encountered similar issues? If so are there any workarounds or shall I go debug optool?

Thanks

@kabiroberai
Copy link
Owner

Hi, it's possible that you're seeing this error due to the app binary not having enough space between its load commands and the rest of the __TEXT segment. Is it specific to a single app or are you seeing it across the board?

@wajsic
Copy link
Author

wajsic commented Oct 2, 2021

I tried with 2 different apps and had the same issues with both. I created a clean app with just a simple dylib to test injection and got it straight away. I can upload IPA and a tweak, if you want to repro. But I did have success before with larger apps so could be related to really small binaries. I tried other tools that also use optool and all came out with same crash so I suspect it's optool's fault but all the repos are dead so I created issue here.

@kabiroberai
Copy link
Owner

Yeah it'd be great if you could send me a reproducible example, thanks!

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