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

Add sanitizer support for modern iOS platforms #106476

Merged

Conversation

keith
Copy link
Contributor

@keith keith commented Jan 5, 2023

asan and tsan generally support iOS, but that previously wasn't configured in rust. This only adds support for the simulator architectures, and arm64 device architecture, not the older 32 bit architectures.

@rustbot
Copy link
Collaborator

rustbot commented Jan 5, 2023

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @Mark-Simulacrum (or someone else) soon.

Please see the contribution instructions for more information.

@rustbot rustbot added T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jan 5, 2023
@rustbot
Copy link
Collaborator

rustbot commented Jan 5, 2023

These commits modify compiler targets.
(See the Target Tier Policy.)

&mut cfg,
use_compiler_launcher,
LdFlags::default(),
&["-fembed-bitcode=off"],
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is required because sanitizers are built with the -U linker flag, which isn't compatible with bitcode. The sanitizers shipped in Xcode also don't have bitcode, and theoretically that shouldn't ever matter since on iOS folks don't ship sanitizers to prod. This wouldn't be necessary if bitcode was dropped entirely now that Xcode 14 deprecated it and Apple no longer accepts apps with it, see rust-lang/cc-rs#768

@bors
Copy link
Contributor

bors commented Jan 6, 2023

☔ The latest upstream changes (presumably #106429) made this pull request unmergeable. Please resolve the merge conflicts.

@keith keith force-pushed the ks/add-sanitizer-support-for-modern-ios-platforms branch from b51d892 to df4b929 Compare January 6, 2023 18:11
@Mark-Simulacrum
Copy link
Member

cc @deg4uss3r

r? @badboy

(Not quite for ios, but seems like there might be more context in iOS simulator target maintainers)

@rustbot rustbot assigned badboy and unassigned Mark-Simulacrum Jan 7, 2023
@badboy
Copy link
Member

badboy commented Jan 9, 2023

Neat. So far I never even tried to reach for the sanitizers, but if it's that easy to allow them I don't see why not.
I won't have time to actually try this before next week, but that shouldn't block this PR.

If this only affects sanitizer builds then I see no problem.

@deg4uss3r
Copy link
Contributor

Agreed with @badboy sorry for the late response, behind on OSS work :/

@apiraino
Copy link
Contributor

apiraino commented Feb 2, 2023

Hello, checking progress: what's the status? is this still waiting on a review or maybe waiting for an official r+ (see comment)?

@badboy
Copy link
Member

badboy commented Feb 2, 2023

@bors r+

@bors
Copy link
Contributor

bors commented Feb 2, 2023

📌 Commit df4b929cef1ada5b7f1cd90ddc4939e2bc0896b1 has been approved by badboy

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 2, 2023
@badboy
Copy link
Member

badboy commented Feb 2, 2023

Apparently I can approve it, so I did.

@bors
Copy link
Contributor

bors commented Feb 3, 2023

⌛ Testing commit df4b929cef1ada5b7f1cd90ddc4939e2bc0896b1 with merge 1cc58a85fde9aab9f56340bdd4c254d17760fbd8...

@bors
Copy link
Contributor

bors commented Feb 3, 2023

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Feb 3, 2023
@rust-log-analyzer

This comment has been minimized.

@keith keith force-pushed the ks/add-sanitizer-support-for-modern-ios-platforms branch from df4b929 to e7cfcb5 Compare February 12, 2023 23:56
@keith
Copy link
Contributor Author

keith commented Feb 12, 2023

Hoping to have fixed the CI issue here, I was passing -fembed-bitcode=off always which was invalid in some linux case, now I only do this if apple is in the target

asan and tsan generally support iOS, but that previously wasn't
configured in rust. This only adds support for the simulator
architectures, and arm64 device architecture, not the older 32 bit
architectures.
@keith keith force-pushed the ks/add-sanitizer-support-for-modern-ios-platforms branch from e7cfcb5 to aacf321 Compare February 13, 2023 00:00
@badboy
Copy link
Member

badboy commented Feb 13, 2023

@bors r+

@bors
Copy link
Contributor

bors commented Feb 13, 2023

📌 Commit aacf321 has been approved by badboy

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 13, 2023
ckxkexing added a commit to ckxkexing/rust that referenced this pull request Feb 17, 2023
…-modern-ios-platforms, r=badboy

Add sanitizer support for modern iOS platforms

asan and tsan generally support iOS, but that previously wasn't configured in rust. This only adds support for the simulator architectures, and arm64 device architecture, not the older 32 bit architectures.
@bors
Copy link
Contributor

bors commented Feb 18, 2023

⌛ Testing commit aacf321 with merge 6d819a4...

@bors
Copy link
Contributor

bors commented Feb 18, 2023

☀️ Test successful - checks-actions
Approved by: badboy
Pushing 6d819a4 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Feb 18, 2023
@bors bors merged commit 6d819a4 into rust-lang:master Feb 18, 2023
@rustbot rustbot added this to the 1.69.0 milestone Feb 18, 2023
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (6d819a4): comparison URL.

Overall result: ❌ regressions - no action needed

@rustbot label: -perf-regression

Instruction count

This is a highly reliable metric that was used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
0.3% [0.3%, 0.3%] 2
Regressions ❌
(secondary)
1.2% [1.2%, 1.2%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.3% [0.3%, 0.3%] 2

Max RSS (memory usage)

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.3% [-2.4%, -2.2%] 2
All ❌✅ (primary) - - 0

Cycles

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-5.7% [-6.5%, -4.9%] 6
All ❌✅ (primary) - - 0

@keith keith deleted the ks/add-sanitizer-support-for-modern-ios-platforms branch November 17, 2023 18:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants