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

Remove size_of == 1 case from fill specialization. #87892

Merged
merged 1 commit into from
Aug 11, 2021
Merged

Conversation

m-ou-se
Copy link
Member

@m-ou-se m-ou-se commented Aug 9, 2021

@rust-highfive
Copy link
Collaborator

r? @yaahc

(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 9, 2021
Copy link
Member

@the8472 the8472 left a comment

Choose a reason for hiding this comment

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

Should be fine as an immediate fix to remove the UB, but I think it's still better to explicitly tell the compiler that it's dealing with a memset when we can rather than relying on optimizers. Currently it helps at least one other backend. And even llvm will have to do less work if we just tell it.

@m-ou-se
Copy link
Member Author

m-ou-se commented Aug 9, 2021

@bors r=the8472 rollup=never

@bors
Copy link
Contributor

bors commented Aug 9, 2021

📌 Commit 3838301 has been approved by the8472

@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 9, 2021
@bors
Copy link
Contributor

bors commented Aug 10, 2021

⌛ Testing commit 3838301 with merge 9910329347e84f297a0281952e6857c145e043a2...

@bors
Copy link
Contributor

bors commented Aug 10, 2021

💥 Test timed out

@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 Aug 10, 2021
@m-ou-se
Copy link
Member Author

m-ou-se commented Aug 10, 2021

@bors retry

@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 10, 2021
@RalfJung
Copy link
Member

@m-ou-se Miri actually runs libcore tests (https://github.com/rust-lang/miri-test-libstd), so it'd be great if you could add your test case from #87891 to the test suite -- doesn't have to be in this PR though.

@rust-log-analyzer
Copy link
Collaborator

A job failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)

@the8472
Copy link
Member

the8472 commented Aug 10, 2021

I think github had some hiccups today.

@bors retry

@bors
Copy link
Contributor

bors commented Aug 11, 2021

⌛ Testing commit 3838301 with merge 0443466ce9adb5af19c2273798e6dcbb36a7dbf4...

@rust-log-analyzer
Copy link
Collaborator

The job i686-msvc-1 failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
[RUSTC-TIMING] regex test:false 13.605
error: could not compile `regex`

Caused by:
  process didn't exit successfully: `D:\a\rust\rust\build\bootstrap/debug/rustc --crate-name regex C:\Users\runneradmin\.cargo\registry\src\github.com-1285ae84e5963aae\regex-1.4.6\src\lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C embed-bitcode=no -C debuginfo=0 -C debug-assertions=on -C overflow-checks=off --cfg "feature=\"aho-corasick\"" --cfg "feature=\"default\"" --cfg "feature=\"memchr\"" --cfg "feature=\"perf\"" --cfg "feature=\"perf-cache\"" --cfg "feature=\"perf-dfa\"" --cfg "feature=\"perf-inline\"" --cfg "feature=\"perf-literal\"" --cfg "feature=\"std\"" --cfg "feature=\"unicode\"" --cfg "feature=\"unicode-age\"" --cfg "feature=\"unicode-bool\"" --cfg "feature=\"unicode-case\"" --cfg "feature=\"unicode-gencat\"" --cfg "feature=\"unicode-perl\"" --cfg "feature=\"unicode-script\"" --cfg "feature=\"unicode-segment\"" -C metadata=5a646be82a6d442c -C extra-filename=-5a646be82a6d442c --out-dir D:\a\rust\rust\build\i686-pc-windows-msvc\stage2-tools\i686-pc-windows-msvc\release\deps --target i686-pc-windows-msvc -L dependency=D:\a\rust\rust\build\i686-pc-windows-msvc\stage2-tools\i686-pc-windows-msvc\release\deps -L dependency=D:\a\rust\rust\build\i686-pc-windows-msvc\stage2-tools\release\deps --extern aho_corasick=D:\a\rust\rust\build\i686-pc-windows-msvc\stage2-tools\i686-pc-windows-msvc\release\deps\libaho_corasick-542a347a9aca5790.rmeta --extern memchr=D:\a\rust\rust\build\i686-pc-windows-msvc\stage2-tools\i686-pc-windows-msvc\release\deps\libmemchr-5e799a68dde9f3d4.rmeta --extern regex_syntax=D:\a\rust\rust\build\i686-pc-windows-msvc\stage2-tools\i686-pc-windows-msvc\release\deps\libregex_syntax-3aa2f83cfa550eb5.rmeta --cap-lints allow -Zmacro-backtrace -Ctarget-feature=+crt-static -Ztls-model=initial-exec -Z binary-dep-depinfo` (exit code: 0xc0000005, STATUS_ACCESS_VIOLATION)
[TIMING] ToolBuild { compiler: Compiler { stage: 2, host: TargetSelection { triple: "i686-pc-windows-msvc", file: None } }, target: TargetSelection { triple: "i686-pc-windows-msvc", file: None }, tool: "rust-demangler", path: "src/tools/rust-demangler", mode: ToolRustc, is_optional_tool: true, source_type: InTree, extra_features: [] } -- 18.763
thread 'main' panicked at 'in-tree tool', src\bootstrap\test.rs:1301:18
[TIMING] RustDemangler { compiler: Compiler { stage: 2, host: TargetSelection { triple: "i686-pc-windows-msvc", file: None } }, target: TargetSelection { triple: "i686-pc-windows-msvc", file: None }, extra_features: [] } -- 0.000
Build completed unsuccessfully in 0:56:35
Build completed unsuccessfully in 0:56:35
make: *** [Makefile:72: ci-subset-1] Error 1

@bors
Copy link
Contributor

bors commented Aug 11, 2021

💔 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 Aug 11, 2021
@m-ou-se
Copy link
Member Author

m-ou-se commented Aug 11, 2021

@bors retry

@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 11, 2021
@bors
Copy link
Contributor

bors commented Aug 11, 2021

⌛ Testing commit 3838301 with merge 362e0f5...

@bors
Copy link
Contributor

bors commented Aug 11, 2021

☀️ Test successful - checks-actions
Approved by: the8472
Pushing 362e0f5 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Aug 11, 2021
@bors bors merged commit 362e0f5 into master Aug 11, 2021
@bors bors deleted the spec-fill-size-one-bye branch August 11, 2021 14:37
@rustbot rustbot added this to the 1.56.0 milestone Aug 11, 2021
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Undefined behaviour in slice::fill specialization.
9 participants