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

Align android sigaddset impl with the reference impl from Bionic #100782

Merged
merged 2 commits into from
Aug 23, 2022

Conversation

thomcc
Copy link
Member

@thomcc thomcc commented Aug 19, 2022

In #100737 I noticed we were treating the sigset_t as an array of bytes, while referencing code from android (https://github.com/aosp-mirror/platform_bionic/blob/ad8dcd6023294b646e5a8288c0ed431b0845da49/libc/include/android/legacy_signal_inlines.h) which treats it as an array of unsigned long.

That said, the behavior difference is so subtle here that it's not hard to see why nobody noticed. This fixes the implementation to be equivalent to the one in bionic.

@rustbot
Copy link
Collaborator

rustbot commented Aug 19, 2022

Hey! It looks like you've submitted a new PR for the library teams!

If this PR contains changes to any rust-lang/rust public library APIs then please comment with @rustbot label +T-libs-api -T-libs to tag it appropriately. If this PR contains changes to any unstable APIs please edit the PR description to add a link to the relevant API Change Proposal or create one if you haven't already. If you're unsure where your change falls no worries, just leave it as is and the reviewer will take a look and make a decision to forward on if necessary.

Examples of T-libs-api changes:

  • Stabilizing library features
  • Introducing insta-stable changes such as new implementations of existing stable traits on existing stable types
  • Introducing new or changing existing unstable library APIs (excluding permanently unstable features / features without a tracking issue)
  • Changing public documentation in ways that create new stability guarantees
  • Changing observable runtime behavior of library APIs

@rustbot rustbot added the T-libs Relevant to the library team, which will review and decide on the PR/issue. label Aug 19, 2022
@rust-highfive
Copy link
Collaborator

r? @Mark-Simulacrum

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 19, 2022
@Mark-Simulacrum
Copy link
Member

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Aug 20, 2022

📌 Commit f506656 has been approved by Mark-Simulacrum

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 Aug 20, 2022
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Aug 21, 2022
…rk-Simulacrum

Align android `sigaddset` impl with the reference impl from Bionic

In rust-lang#100737 I noticed we were treating the sigset_t as an array of bytes, while referencing code from android (https://github.com/aosp-mirror/platform_bionic/blob/ad8dcd6023294b646e5a8288c0ed431b0845da49/libc/include/android/legacy_signal_inlines.h) which treats it as an array of unsigned long.

That said, the behavior difference is so subtle here that it's not hard to see why nobody noticed. This fixes the implementation to be equivalent to the one in bionic.
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Aug 21, 2022
…rk-Simulacrum

Align android `sigaddset` impl with the reference impl from Bionic

In rust-lang#100737 I noticed we were treating the sigset_t as an array of bytes, while referencing code from android (https://github.com/aosp-mirror/platform_bionic/blob/ad8dcd6023294b646e5a8288c0ed431b0845da49/libc/include/android/legacy_signal_inlines.h) which treats it as an array of unsigned long.

That said, the behavior difference is so subtle here that it's not hard to see why nobody noticed. This fixes the implementation to be equivalent to the one in bionic.
@matthiaskrgr
Copy link
Member

@bors r- failed in a rollup
#100828 (comment)

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Aug 21, 2022
@thomcc
Copy link
Member Author

thomcc commented Aug 21, 2022

@bors try

(I think this includes the stuff that failed?)

@bors
Copy link
Contributor

bors commented Aug 21, 2022

⌛ Trying commit 4ecf876 with merge 5b1f98a3aa6cd874cb1f46edf817e39e6ffb89c6...

@matthiaskrgr
Copy link
Member

This failed on the dist-android builder, so probably not :/

@thomcc
Copy link
Member Author

thomcc commented Aug 21, 2022

Huh, I thought try ran the same tests that run on rollup (I guess I just assumed this. in my defense, this is more or less what try was used for on firefox).

Is there an easy way to do that?

@thomcc
Copy link
Member Author

thomcc commented Aug 21, 2022

I guess I can make it fail here with rollup=never, and at least this way it won't cause someone else trouble. Ideally I'd have a local android dev env set up, but mine broke a few months ago and I haven't gotten around to it.

@bors r=Mark-Simulacrum rollup=never

@bors
Copy link
Contributor

bors commented Aug 21, 2022

📌 Commit 4ecf876 has been approved by Mark-Simulacrum

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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Aug 21, 2022
@bors
Copy link
Contributor

bors commented Aug 21, 2022

☀️ Test successful - checks-actions
Approved by: Mark-Simulacrum
Pushing 5b1f98a3aa6cd874cb1f46edf817e39e6ffb89c6 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Aug 21, 2022
@bors
Copy link
Contributor

bors commented Aug 21, 2022

👀 Test was successful, but fast-forwarding failed: 422 Update is not a fast forward

@matthiaskrgr
Copy link
Member

Ouff, do we still have bug that when we bors try and r+ while the pr is compiling for try the try build would try to merge it right away because its "approved" now?

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (5b1f98a3aa6cd874cb1f46edf817e39e6ffb89c6): comparison url.

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results
  • Primary benchmarks: no relevant changes found
  • Secondary benchmarks: mixed results
mean1 max count2
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
2.1% 2.4% 3
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.9% -2.9% 1
All ❌✅ (primary) - - 0

Cycles

Results
  • Primary benchmarks: mixed results
  • Secondary benchmarks: no relevant changes found
mean1 max count2
Regressions ❌
(primary)
1.9% 1.9% 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-3.7% -3.7% 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -0.9% -3.7% 2

If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf.

@rustbot label: -perf-regression

Footnotes

  1. the arithmetic mean of the percent change 2

  2. number of relevant changes 2

@Mark-Simulacrum
Copy link
Member

OK, please don't try and then r+ in the future (until rust-lang/homu#47 is fixed).

Otherwise I think @bors r=Mark-Simulacrum rollup=never is reasonable.

We can make try builds run android with some work -- there's some documentation here: https://rustc-dev-guide.rust-lang.org/tests/ci.html#using-ci-to-test

@bors
Copy link
Contributor

bors commented Aug 21, 2022

💡 This pull request was already approved, no need to approve it again.

  • This pull request previously failed. You should add more commits to fix the bug, or use retry to trigger a build again.
  • There's another pull request that is currently being tested, blocking this pull request: Kind-less SessionDiagnostic derive #100765

@bors
Copy link
Contributor

bors commented Aug 21, 2022

📌 Commit 4ecf876 has been approved by Mark-Simulacrum

It is now in the queue for this repository.

@thomcc
Copy link
Member Author

thomcc commented Aug 22, 2022

OK, please don't try and then r+ in the future (until rust-lang/homu#47 is fixed

Noted, thanks, I didn't realize that bug existed.

@bors
Copy link
Contributor

bors commented Aug 23, 2022

⌛ Testing commit 4ecf876 with merge 1cff564...

@bors
Copy link
Contributor

bors commented Aug 23, 2022

☀️ Test successful - checks-actions
Approved by: Mark-Simulacrum
Pushing 1cff564 to master...

@bors bors merged commit 1cff564 into rust-lang:master Aug 23, 2022
@rustbot rustbot added this to the 1.65.0 milestone Aug 23, 2022
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (1cff564): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

This benchmark run did not return any relevant results for this metric.

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.

mean1 range count2
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
4.8% [4.0%, 5.9%] 3
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-3.3% [-3.3%, -3.3%] 1
All ❌✅ (primary) - - 0

Footnotes

  1. the arithmetic mean of the percent change

  2. number of relevant changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants