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

Support debuginfo for custom MIR. #115540

Merged
merged 2 commits into from
Sep 5, 2023
Merged

Conversation

cjgillot
Copy link
Contributor

@cjgillot cjgillot commented Sep 4, 2023

No description provided.

@rustbot
Copy link
Collaborator

rustbot commented Sep 4, 2023

r? @petrochenkov

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added 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. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Sep 4, 2023
@petrochenkov
Copy link
Contributor

r? compiler

@rustbot rustbot assigned oli-obk and unassigned petrochenkov Sep 5, 2023
@oli-obk
Copy link
Contributor

oli-obk commented Sep 5, 2023

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Sep 5, 2023

📌 Commit 905fd1b has been approved by oli-obk

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 Sep 5, 2023
bors added a commit to rust-lang-ci/rust that referenced this pull request Sep 5, 2023
…iaskrgr

Rollup of 7 pull requests

Successful merges:

 - rust-lang#113510 (Document soundness of Integer -> Pointer -> Integer conversions in `const` contexts.)
 - rust-lang#114412 (document our assumptions about symbols provided by the libc)
 - rust-lang#114813 (explain why we can mutate the FPU control word)
 - rust-lang#115523 (improve `AttrTokenStream`)
 - rust-lang#115536 (interpret: make MemPlace, Place, Operand types private to the interpreter)
 - rust-lang#115540 (Support debuginfo for custom MIR.)
 - rust-lang#115563 (llvm-wrapper: adapt for LLVM API change)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 9381e5b into rust-lang:master Sep 5, 2023
11 checks passed
@rustbot rustbot added this to the 1.74.0 milestone Sep 5, 2023
@cjgillot cjgillot deleted the custom-debuginfo branch September 5, 2023 17:00
@RalfJung
Copy link
Member

RalfJung commented Sep 7, 2023

Did this break stage 0 Miri tests? ./x.py test miri --stage 0

tests/pass/function_calls/return_place_on_heap.rs FAILED:
command: "/home/r/src/rust/rustc/build/x86_64-unknown-linux-gnu/stage0-tools-bin/miri" "--error-format=json" "-Dwarnings" "-Dunused" "-Ainternal_features" "-Zui-testing" "--target" "x86_64-unknown-linux-gnu" "--out-dir" "/home/r/src/rust/rustc/build/x86_64-unknown-linux-gnu/stage0-tools/ui" "tests/pass/function_calls/return_place_on_heap.rs" "--edition" "2021"




pass test got exit status: 1, but expected 0

actual output differed from expected
Execute `./miri test --bless` to update `tests/pass/function_calls/return_place_on_heap.stderr` to the actual output
--- tests/pass/function_calls/return_place_on_heap.stderr
+++ <stderr output>
+error: Could not parse debuginfo, found: "Block { block: b0 }"
+  --> $DIR/return_place_on_heap.rs:LL:CC
+   |
+LL | /     mir! {
+LL | |         {
+LL | |             let x = 0;
+LL | |             let ptr = &raw mut x;
+...  |
+LL | |         }
+LL | |     }
+   | |_____^
+   |
+   = note: this error originates in the macro `::core::intrinsics::mir::__internal_remove_let` which comes from the expansion of the macro `mir` (in Nightly builds, run with -Z macro-backtrace for more info)
+
+error: aborting due to previous error
+
+


There were 1 unmatched diagnostics at tests/pass/function_calls/return_place_on_heap.rs:10
    Error: Could not parse debuginfo, found: "Block { block: b0 }"

full stderr:
error: Could not parse debuginfo, found: "Block { block: b0 }"
  --> tests/pass/function_calls/return_place_on_heap.rs:10:5
   |
LL | /     mir! {
LL | |         {
LL | |             let x = 0;
LL | |             let ptr = &raw mut x;
...  |
LL | |         }
LL | |     }
   | |_____^
   |
   = note: this error originates in the macro `::core::intrinsics::mir::__internal_remove_let` which comes from the expansion of the macro `mir` (in Nightly builds, run with -Z macro-backtrace for more info)

error: aborting due to previous error



FAILURES:
    tests/pass/align_repeat_into_packed_field.rs
    tests/pass/unsized.rs (revision stack)
    tests/pass/unsized.rs (revision tree)
    tests/pass/function_calls/return_place_on_heap.rs

On CI we only run stage 2 tests, but for local development stage 0 tests are very valuable.

@@ -371,6 +379,7 @@ pub macro mir {
(
$(type RET = $ret_ty:ty ;)?
$(let $local_decl:ident $(: $local_decl_ty:ty)? ;)*
$(debug $dbg_name:ident => $dbg_data:expr ;)*
Copy link
Member

Choose a reason for hiding this comment

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

Would be great if some doc comment somewhere explained this syntax.

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. 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.

6 participants