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

rustc_llvm: update PassWrapper for recent LLVM #90589

Merged
merged 3 commits into from
Nov 12, 2021

Conversation

durin42
Copy link
Contributor

@durin42 durin42 commented Nov 4, 2021

Now AddressSanitizerOptions is a struct, but at least the change was
tiny.

r? @nikic

@rust-highfive
Copy link
Collaborator

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

Please see the contribution instructions for more information.

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Nov 4, 2021
@nikic
Copy link
Contributor

nikic commented Nov 4, 2021

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Nov 4, 2021

📌 Commit 50a5ebe has been approved by nikic

@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 Nov 4, 2021
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Nov 4, 2021
…ikic

rustc_llvm: update PassWrapper for recent LLVM

Now AddressSanitizerOptions is a struct, but at least the change was
tiny.

r? `@nikic`
@durin42
Copy link
Contributor Author

durin42 commented Nov 4, 2021

Also, I'm seeing some failures with this applied:

---- [ui] ui/sanitize/issue-72154-lifetime-markers.rs stdout ----

error: test run failed!
status: exit status: 1
command: "/usr/local/google/home/augie/Programming/big/rust/build/x86_64-unknown-linux-gnu/test/ui/sanitize/issue-72154-lifetime-markers/a"
stdout:
------------------------------------------

------------------------------------------
stderr:
------------------------------------------
AddressSanitizer:DEADLYSIGNAL
=================================================================
==426626==ERROR: AddressSanitizer: SEGV on unknown address 0x020080fc12e5 (pc 0x55b3f13d70c2 bp 0x7ffc3f28bb30 sp 0x7ffc3f28b940 T0)
==426626==The signal is caused by a READ memory access.
    #0 0x55b3f13d70c2  (/usr/local/google/home/augie/Programming/big/rust/build/x86_64-unknown-linux-gnu/test/ui/sanitize/issue-72154-lifetime-markers/a+0xc70c2)
    #1 0x55b3f13da0a2  (/usr/local/google/home/augie/Programming/big/rust/build/x86_64-unknown-linux-gnu/test/ui/sanitize/issue-72154-lifetime-markers/a+0xca0a2)
    #2 0x7fd4ab952e49  (/lib/x86_64-linux-gnu/libc.so.6+0x27e49)
    #3 0x55b3f1317359  (/usr/local/google/home/augie/Programming/big/rust/build/x86_64-unknown-linux-gnu/test/ui/sanitize/issue-72154-lifetime-markers/a+0x7359)

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV (/usr/local/google/home/augie/Programming/big/rust/build/x86_64-unknown-linux-gnu/test/ui/sanitize/issue-72154-lifetime-markers/a+0xc70c2)
==426626==ABORTING

------------------------------------------


---- [ui] ui/sanitize/address.rs stdout ----

error: error pattern ' AddressSanitizer: stack-buffer-overflow' not found!

error: error pattern ' 'xs' (line 15) <== Memory access at offset' not found!

error: multiple error patterns not found
status: exit status: 1
command: "/usr/local/google/home/augie/Programming/big/rust/build/x86_64-unknown-linux-gnu/test/ui/sanitize/address/a"
stdout:
------------------------------------------

------------------------------------------
stderr:
------------------------------------------
AddressSanitizer:DEADLYSIGNAL
=================================================================
==426623==ERROR: AddressSanitizer: SEGV on unknown address 0x02008587e89c (pc 0x5564554540b9 bp 0x7ffd621e2800 sp 0x7ffd621e26e0 T0)
==426623==The signal is caused by a READ memory access.
    #0 0x5564554540b9  (/usr/local/google/home/augie/Programming/big/rust/build/x86_64-unknown-linux-gnu/test/ui/sanitize/address/a+0xc70b9)
    #1 0x7f8c762e9e49  (/lib/x86_64-linux-gnu/libc.so.6+0x27e49)
    #2 0x556455395349  (/usr/local/google/home/augie/Programming/big/rust/build/x86_64-unknown-linux-gnu/test/ui/sanitize/address/a+0x8349)

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV (/usr/local/google/home/augie/Programming/big/rust/build/x86_64-unknown-linux-gnu/test/ui/sanitize/address/a+0xc70b9)
==426623==ABORTING

------------------------------------------


---- [ui] ui/sanitize/use-after-scope.rs stdout ----

error: error pattern ' ERROR: AddressSanitizer: stack-use-after-scope' not found!
status: exit status: 1
command: "/usr/local/google/home/augie/Programming/big/rust/build/x86_64-unknown-linux-gnu/test/ui/sanitize/use-after-scope/a"
stdout:
------------------------------------------

------------------------------------------
stderr:
------------------------------------------
AddressSanitizer:DEADLYSIGNAL
=================================================================
==426645==ERROR: AddressSanitizer: SEGV on unknown address 0x0200862997ba (pc 0x55fe7a9b9e69 bp 0x7ffd8a89ef80 sp 0x7ffd8a89ee60 T0)
==426645==The signal is caused by a READ memory access.
    #0 0x55fe7a9b9e69  (/usr/local/google/home/augie/Programming/big/rust/build/x86_64-unknown-linux-gnu/test/ui/sanitize/use-after-scope/a+0xc6e69)
    #1 0x7f27523b5e49  (/lib/x86_64-linux-gnu/libc.so.6+0x27e49)
    #2 0x55fe7a8fb349  (/usr/local/google/home/augie/Programming/big/rust/build/x86_64-unknown-linux-gnu/test/ui/sanitize/use-after-scope/a+0x8349)

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV (/usr/local/google/home/augie/Programming/big/rust/build/x86_64-unknown-linux-gnu/test/ui/sanitize/use-after-scope/a+0xc6e69)
==426645==ABORTING

------------------------------------------


---- [ui] ui/sanitize/new-llvm-pass-manager-thin-lto.rs#opt0 stdout ----

error in revision `opt0`: error pattern ' ERROR: AddressSanitizer: stack-use-after-scope' not found!
status: exit status: 1
command: "/usr/local/google/home/augie/Programming/big/rust/build/x86_64-unknown-linux-gnu/test/ui/sanitize/new-llvm-pass-manager-thin-lto.opt0/a"
stdout:
------------------------------------------

------------------------------------------
stderr:
------------------------------------------
AddressSanitizer:DEADLYSIGNAL
=================================================================
==429414==ERROR: AddressSanitizer: SEGV on unknown address 0x020085494740 (pc 0x55fa31cde252 bp 0x7ffd5275d1f0 sp 0x7ffd5275d000 T0)
==429414==The signal is caused by a READ memory access.
    #0 0x55fa31cde252  (/usr/local/google/home/augie/Programming/big/rust/build/x86_64-unknown-linux-gnu/test/ui/sanitize/new-llvm-pass-manager-thin-lto.opt0/a+0xe5252)
    #1 0x55fa31ce03b2  (/usr/local/google/home/augie/Programming/big/rust/build/x86_64-unknown-linux-gnu/test/ui/sanitize/new-llvm-pass-manager-thin-lto.opt0/a+0xe73b2)
    #2 0x7fbba9271e49  (/lib/x86_64-linux-gnu/libc.so.6+0x27e49)
    #3 0x55fa31c04309  (/usr/local/google/home/augie/Programming/big/rust/build/x86_64-unknown-linux-gnu/test/ui/sanitize/new-llvm-pass-manager-thin-lto.opt0/a+0xb309)

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV (/usr/local/google/home/augie/Programming/big/rust/build/x86_64-unknown-linux-gnu/test/ui/sanitize/new-llvm-pass-manager-thin-lto.opt0/a+0xe5252)
==429414==ABORTING

------------------------------------------


---- [ui] ui/sanitize/new-llvm-pass-manager-thin-lto.rs#opt1 stdout ----

error in revision `opt1`: error pattern ' ERROR: AddressSanitizer: stack-use-after-scope' not found!
status: exit status: 1
command: "/usr/local/google/home/augie/Programming/big/rust/build/x86_64-unknown-linux-gnu/test/ui/sanitize/new-llvm-pass-manager-thin-lto.opt1/a"
stdout:
------------------------------------------

------------------------------------------
stderr:
------------------------------------------
AddressSanitizer:DEADLYSIGNAL
=================================================================
==431968==ERROR: AddressSanitizer: SEGV on unknown address 0x020089056902 (pc 0x560c3cb35bea bp 0x7ffe417e41b0 sp 0x7ffe417e4080 T0)
==431968==The signal is caused by a READ memory access.
    #0 0x560c3cb35bea  (/usr/local/google/home/augie/Programming/big/rust/build/x86_64-unknown-linux-gnu/test/ui/sanitize/new-llvm-pass-manager-thin-lto.opt1/a+0xd5bea)
    #1 0x7f96f619fe49  (/lib/x86_64-linux-gnu/libc.so.6+0x27e49)
    #2 0x560c3ca6d869  (/usr/local/google/home/augie/Programming/big/rust/build/x86_64-unknown-linux-gnu/test/ui/sanitize/new-llvm-pass-manager-thin-lto.opt1/a+0xd869)

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV (/usr/local/google/home/augie/Programming/big/rust/build/x86_64-unknown-linux-gnu/test/ui/sanitize/new-llvm-pass-manager-thin-lto.opt1/a+0xd5bea)
==431968==ABORTING

------------------------------------------

Not sure what to make of those, will have to resume digging tomorrow, but if someone sees something please let me know.

@tmiasko
Copy link
Contributor

tmiasko commented Nov 4, 2021

It could be https://reviews.llvm.org/D112732, if you already have those changes included.

@durin42
Copy link
Contributor Author

durin42 commented Nov 5, 2021

Hm, that got reverted as https://reviews.llvm.org/D113129, so it's not _that. I'm bisecting now, but I'm pretty sure that this patch is safe, given that I've had clean test runs with this patch applied while bisecting the other breakages.

@tmiasko
Copy link
Contributor

tmiasko commented Nov 5, 2021

It re-landed shortly after https://reviews.llvm.org/rGa55c4ec1cee7683d9095327d9d33e7137ec25292 and they will require accompanying changes on rustc side to avoid performing function instrumentation twice.

@durin42
Copy link
Contributor Author

durin42 commented Nov 5, 2021

Aha, I hadn't noticed it had re-landed. Thanks!

Now AddressSanitizerOptions is a struct, but at least the change was
tiny.

r? nikic
@apiraino apiraino added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Nov 11, 2021
This happened later in the stream than the other changes, but the fix is
overlapping. Fix taken from a55c4ec in
LLVM.
@durin42
Copy link
Contributor Author

durin42 commented Nov 11, 2021

Hey @nikic I'm sorry but we hit an overlapping fix and had to rebase/add one patch. Can you take a quick look? Things are unchanged other than the last patch in the end.

@nikic
Copy link
Contributor

nikic commented Nov 11, 2021

@bors r+

@bors
Copy link
Contributor

bors commented Nov 11, 2021

📌 Commit d9f2d5f has been approved by nikic

the8472 added a commit to the8472/rust that referenced this pull request Nov 11, 2021
…ikic

rustc_llvm: update PassWrapper for recent LLVM

Now AddressSanitizerOptions is a struct, but at least the change was
tiny.

r? `@nikic`
@bors
Copy link
Contributor

bors commented Nov 12, 2021

⌛ Testing commit d9f2d5f with merge 83c0cb760c709fbeecaeed81d70e9f2fb2b0bdf7...

@bors
Copy link
Contributor

bors commented Nov 12, 2021

💔 Test failed - checks-actions

@bors bors removed the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Nov 12, 2021
@bors bors added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Nov 12, 2021
@rust-log-analyzer
Copy link
Collaborator

The job x86_64-gnu-distcheck failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
   Compiling bootstrap v0.0.0 (/checkout/src/bootstrap)
error: could not compile `lazy_static`

Caused by:
  process didn't exit successfully: `/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/rustc --crate-name lazy_static /cargo/registry/src/github.aaakk.us.kg-1ecc6299db9ec823/lazy_static-1.4.0/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts --crate-type lib --emit=dep-info,metadata,link -C embed-bitcode=no -C debuginfo=0 -C metadata=1f5d3923e02f6398 -C extra-filename=-1f5d3923e02f6398 --out-dir /checkout/obj/build/bootstrap/debug/deps -L dependency=/checkout/obj/build/bootstrap/debug/deps --cap-lints allow -Wrust_2018_idioms -Wunused_lifetimes -Wsemicolon_in_expressions_from_macros -Dwarnings` (signal: 11, SIGSEGV: invalid memory reference)
error: build failed
failed to run: /checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo build --manifest-path /checkout/src/bootstrap/Cargo.toml --locked
Build completed unsuccessfully in 0:00:54
make: *** [prepare] Error 1
---
[RUSTC-TIMING] flate2 test:false 0.773
[RUSTC-TIMING] crossbeam_utils test:false 0.966
[RUSTC-TIMING] crossbeam_epoch test:false 0.723
[RUSTC-TIMING] rayon test:false 0.178
rustc exited with signal: 11 (core dumped)
error: could not compile `rayon`
Caused by:
Caused by:
  process didn't exit successfully: `/checkout/obj/build/bootstrap/debug/rustc --crate-name rayon --edition=2018 /cargo/registry/src/github.aaakk.us.kg-1ecc6299db9ec823/rayon-1.3.1/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 metadata=5531beba540f0424 -C extra-filename=-5531beba540f0424 --out-dir /checkout/obj/build/x86_64-unknown-linux-gnu/stage0-bootstrap-tools/x86_64-unknown-linux-gnu/release/deps --target x86_64-unknown-linux-gnu -L dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-bootstrap-tools/x86_64-unknown-linux-gnu/release/deps -L dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-bootstrap-tools/release/deps --extern crossbeam_deque=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-bootstrap-tools/x86_64-unknown-linux-gnu/release/deps/libcrossbeam_deque-12cac83920907799.rmeta --extern either=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-bootstrap-tools/x86_64-unknown-linux-gnu/release/deps/libeither-25313dce9eae3e67.rmeta --extern rayon_core=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-bootstrap-tools/x86_64-unknown-linux-gnu/release/deps/librayon_core-224ff4e33ff777ff.rmeta --cap-lints allow --cfg=bootstrap -Zsymbol-mangling-version=v0 -Zmacro-backtrace '-Clink-args=-Wl,-rpath,$ORIGIN/../lib' -Ztls-model=initial-exec -Z binary-dep-depinfo --cfg step_by` (exit status: 254)
[RUSTC-TIMING] yaml_rust test:false 2.473
[RUSTC-TIMING] rayon_core test:false 0.993
[RUSTC-TIMING] tar test:false 1.716
[RUSTC-TIMING] clap test:false 5.929

@nikic
Copy link
Contributor

nikic commented Nov 12, 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 Nov 12, 2021
bors added a commit to rust-lang-ci/rust that referenced this pull request Nov 12, 2021
…askrgr

Rollup of 7 pull requests

Successful merges:

 - rust-lang#90589 (rustc_llvm: update PassWrapper for recent LLVM)
 - rust-lang#90644 (Extend the const swap feature)
 - rust-lang#90704 (Unix ExitStatus comments and a tiny docs fix)
 - rust-lang#90761 (Shorten Span of unused macro lints)
 - rust-lang#90795 (Add more comments to explain the code to generate the search index)
 - rust-lang#90798 (Document `unreachable!` custom panic message)
 - rust-lang#90826 (rustc_feature: Convert `BuiltinAttribute` from tuple to a struct)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 1fe15be into rust-lang:master Nov 12, 2021
@rustbot rustbot added this to the 1.58.0 milestone Nov 12, 2021
@durin42 durin42 deleted the llvm-14-ASO-now-struct branch December 16, 2021 22:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. 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