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/ObjC: Avoid generating names containing non-printable chars #6236

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

droe
Copy link

@droe droe commented Dec 6, 2024

Avoid generating ObjC symbol names containing ASCII control characters for both 8 and 16 bit character encodings.

Behaviour is like before for each, except that ASCII control characters (0..0x1f) are replaced by ?, except for carriage return, line feed, and tabulator characters, which are replaced by \r, \n and \t respectively.

For an example CF string of "Hello world!\r\n", with this change, the symbol would be named cfstr_Hello_world!\r\n, instead of w/o this change cfstr_Hello_world! with embedded CR/LF that display as slightly weird spaces.

Tested on latest stable by rebasing this change on top of v4.2.6455-stable.

Avoid generating ObjC symbol names containing non-printable characters
for both 8 and 16 bit character encodings.
@CLAassistant
Copy link

CLAassistant commented Dec 6, 2024

CLA assistant check
All committers have signed the CLA.

@0cyn 0cyn self-assigned this Dec 10, 2024
@0cyn
Copy link
Member

0cyn commented Dec 10, 2024

Thank you so much for this PR, I'm currently working through several PRs related to sharedcache processing and will be taking a look at this one within the next couple of weeks as we finish working through those.

@droe
Copy link
Author

droe commented Dec 21, 2024

FWIW, the issue this PR addresses is exacerbated by latest dev builds displaying symbol names with newlines as multi-line symbol names in the symbol list, leading to a lot of wasted vertical space.

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

Successfully merging this pull request may close these issues.

4 participants