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

MachO::Binary: treat all sections in the same way during shift #1134

Merged

Conversation

DzenIsRich
Copy link
Contributor

No description provided.

@romainthomas
Copy link
Member

I welcome a test case that ensures we don't regress this fix.

@DzenIsRich DzenIsRich marked this pull request as draft December 16, 2024 18:50
Previously there were exceptions for zerofill sections because offset
checks were not correct. After fixing checks for offsets/va, special
handling of zerofill sections is no longer needed.
@DzenIsRich DzenIsRich force-pushed the zmpr-macho-thread-local-zerofill branch from 544ab8d to 5c8604a Compare December 17, 2024 12:33
@DzenIsRich DzenIsRich changed the title MachO::Binary: treat thread local zerofill as global zerofill MachO::Binary: treat all sections in the same way during shift Dec 17, 2024
@DzenIsRich DzenIsRich marked this pull request as ready for review December 17, 2024 16:08
@DzenIsRich
Copy link
Contributor Author

DzenIsRich commented Dec 17, 2024

It is not trivial to craft a test case that reproduces the problem on main branch. I can reproduce the problem with proprietary binary that I cannot share, but it's difficult to minimize it.

Can we proceed without tests?

@romainthomas
Copy link
Member

Ok I trust you on this. I'll see if I can find a testcase on my end.

@romainthomas romainthomas merged commit 1c46aed into lief-project:main Dec 21, 2024
@DzenIsRich DzenIsRich deleted the zmpr-macho-thread-local-zerofill branch December 21, 2024 10:07
romainthomas pushed a commit that referenced this pull request Dec 23, 2024
Previously there were exceptions for zerofill sections because offset
checks were not correct. After fixing checks for offsets/va, special
handling of zerofill sections is no longer needed.
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

Successfully merging this pull request may close these issues.

2 participants