-
Notifications
You must be signed in to change notification settings - Fork 49
Hook individual objects #15
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
78 commits
Select commit
Hold shift + click to select a range
f4287f3
add sample for segfault
steipete 807a047
push changes for abort trap 6
steipete e8a63b8
Cursed first version
steipete 333ba4c
cleanup
steipete 4f85b46
Remove object retain to allow integer returns
steipete 839a2e5
Add integer test case
steipete a053337
Remove zombies
steipete 7d349a8
Add combined test
steipete 463dc81
Add swiftlint rule
steipete 1fb6c6c
Illegal Instruction 4
steipete faa3e53
Work around compiler crash
steipete 55cc408
add object task
steipete d822fc0
Try to make watchOS compile
steipete e42f2ff
Large class refactor, rename task to hook
steipete 5f0fe6f
remove swiftlint rule for Foundation
steipete e05016b
swiftlint
steipete c5cb344
Move types into method call
steipete eadb073
Add ITKAddSuperMethod and new generics
steipete 0c5624c
Add more tests
steipete 40e8f66
x64 works!
steipete c9fc2df
Add additional tests
steipete 7888297
Fix memory leak
steipete 17475fd
cleanup
steipete 1357b8d
write arm64
steipete 7a562e8
Use thread local storage
steipete 5c6b75d
cleanup
steipete 9993a61
add links to assembly
steipete 9f345e3
Add test and stret handling
steipete 10c4aa4
Document!
steipete ef4431f
Remove assembly based object hook
steipete db7b24d
add link to article
steipete 5619117
header cleanup
steipete 84a1923
Add floating point register protection
steipete aa86ace
tweak assembly
steipete 430ea37
Prepare new test
steipete c0779aa
Add tests, remove KVO support
steipete d014741
lipstick
steipete 53c9371
remove test host for CI
steipete 3c7e36f
really remove test host
steipete 5faede9
use error log
steipete 1695fc7
Disable code signing
steipete 9c9d0d0
todo
steipete ef94e2f
Warn instead of error for unknown architectures
steipete ab78db4
Touched by Xcode 11.6
steipete cd828b5
Addd ILP32 link
steipete 0d20b61
disable code signing
steipete f960072
Support removal of multiple hooks
steipete df9ce33
fix jazzy
steipete 562885f
Move error to own file
steipete 505578f
Return self on apply
steipete 524bf93
Support shorter syntax as NSObject category
steipete e3a954d
Use shorter syntax
steipete 26721b6
Update readme
steipete 304f8ad
Fix Linux
steipete 33f0777
move file to source
steipete 8e024eb
Remove interpose NSObject helper, add class-based version
steipete 54f8686
refer to @_dynamicReplacement
steipete 6f2f13f
Merge branch 'master' into peter/objecthooks
steipete a66718a
add improvement idea
steipete 66b2224
use shorter hook syntax
steipete 600c58b
Don't swiftlint analyze tests
steipete 471adce
Move SuperBuilder to SwiftPM folder structure
steipete c73f3c8
Update swiftlint_analyze.yml
steipete ff9644c
Improve Linux Support
steipete 9207555
Linux Support
steipete cb3e6b3
Swiftlint
steipete e55364a
remove unused decl rule
steipete dcb01ab
add object example
steipete 748a544
Linux
steipete e994a63
Linux
steipete 122d4df
Linux
steipete 363429b
Linux
steipete b040f7f
equatable
steipete 9965a84
add objc to error
steipete a953f70
Linux support
steipete e042d8f
linux
steipete a202a0f
linux
steipete b90bdcd
add docs
steipete File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
write arm64
- Loading branch information
commit 1357b8d36aa9f123d87ce8a89b5233dcff11069f
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, just stopping by from your article and figured this was probably the easiest place to ask a question–I hope you don't mind. Anyways, why tail call (and use TLS to store the
objc_super
) instead of creating the structure on the stack and callingobjc_msgSendSuper2
normally, then fixing up the stack pointer?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good question! We don‘t know how many parameters are in the call - some could be on the stack so we can‘t use it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, right, that explains it 🤦. Another question: is there a need to save
x0
, given that you're overwriting it anyways?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, but I can save registers only in pairs on ARM64. Could pick any other but x0 seemed fine.