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

debuginfo/boxed-struct test fails with LLDB 8 #64050

Closed
ranweiler opened this issue Sep 1, 2019 · 0 comments · Fixed by #64052
Closed

debuginfo/boxed-struct test fails with LLDB 8 #64050

ranweiler opened this issue Sep 1, 2019 · 0 comments · Fixed by #64052

Comments

@ranweiler
Copy link
Contributor

On a fresh clone (b314654) of the rust repro, using LLVM/clang/lldb 8.0.0, the debuginfo/boxed-struct test fails due to #47938.

As noted in my comment there, the cause is the local variable unique shadowing core::unique.

This can be fixed by renaming the local variable unique in test/debuginfo/boxed-struct.rs.

Output dump:
Check compiletest suite=debuginfo mode=debuginfo-gdb+lldb (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)

running 1 test
F
failures:

---- [debuginfo-gdb+lldb] debuginfo/boxed-struct.rs stdout ----
NOTE: compiletest thinks it is using GDB with native rust support
NOTE: compiletest thinks it is using GDB version 8003000
NOTE: compiletest thinks it is using LLDB version 800
NOTE: compiletest thinks it is using LLDB without native rust support

error: line not found in debugger output: [...]$0 = StructWithSomePadding { x: 99, y: 999, z: 9999, w: 99999 }
status: exit code: 0
command: "/bin/python2.7" "/home/joe/src/rust/src/etc/lldb_batchmode.py" "/home/joe/src/rust/build/x86_64-unknown-linux-gnu/test/debuginfo/boxed-struct/a" "/home/joe/src/rust/build/x86_64-unknown-linux-gnu/test/debuginfo/boxed-struct/boxed-struct.debugger.script"
stdout:
------------------------------------------
LLDB batch-mode script
----------------------
Debugger commands script is '/home/joe/src/rust/build/x86_64-unknown-linux-gnu/test/debuginfo/boxed-struct/boxed-struct.debugger.script'.
Target executable is '/home/joe/src/rust/build/x86_64-unknown-linux-gnu/test/debuginfo/boxed-struct/a'.
Current working directory is '/home/joe/src/rust'
Creating a target for '/home/joe/src/rust/build/x86_64-unknown-linux-gnu/test/debuginfo/boxed-struct/a'
settings set auto-confirm true

version
lldb version 8.0.0
command script import /home/joe/src/rust/./src/etc/lldb_rust_formatters.py
type summary add --no-value --python-function lldb_rust_formatters.print_val -x ".*" --category Rust
type category enable Rust

breakpoint set --file 'boxed-struct.rs' --line 60
Breakpoint 1: where = a`boxed_struct::main::h2db3f42e937787d0 + 174 at boxed-struct.rs:60:4, address = 0x000000000000157e
run
Hit breakpoint 1.1: where = a`boxed_struct::main::h2db3f42e937787d0 + 174 at boxed-struct.rs:60:4, address = 0x000055555555557e, resolved, hit count = 1
Process 17380 stopped * thread #1, name = 'a', stop reason = breakpoint 1.1 frame #0: 0x000055555555557e a`boxed_struct::main::h2db3f42e937787d0 at boxed-struct.rs:60:4 57 let unique: Box<_> = box StructWithSomePadding { x: 99, y: 999, z: 9999, w: 99999 }; 58 59 let unique_dtor: Box<_> = box StructWithDestructor { x: 77, y: 777, z: 7777, w: 77777 }; -> 60 zzz(); // #break ^ 61 } 62 63 fn zzz() { () } Process 17380 launched: '/home/joe/src/rust/build/x86_64-unknown-linux-gnu/test/debuginfo/boxed-struct/a' (x86_64)
print *unique
error: reference to 'unique' is ambiguous
candidate found by name lookup is 'unique'
candidate found by name lookup is 'core::ptr::unique'

print *unique_dtor
(boxed_struct::StructWithDestructor) $0 = StructWithDestructor { x: 77, y: 777, z: 7777, w: 77777 }
quit
None

------------------------------------------
stderr:
------------------------------------------

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



failures:
    [debuginfo-gdb+lldb] debuginfo/boxed-struct.rs

test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 122 filtered out

thread 'main' panicked at 'Some tests failed', src/tools/compiletest/src/main.rs:536:22

I am invoking it via:

./x.py test --stage 1 src/test/debuginfo/boxed-struct.rs

My OS is x86-64 Linux 4.19.

Centril added a commit to Centril/rust that referenced this issue Sep 5, 2019
…050, r=alexcrichton

Rename test locals to work around LLDB bug

LLDB's expression parser can't unambiguously resolve local variables in
some cases, as described in rust-lang#47938. Work around this by using names that
don't shadow direct submodules of `core`.

Closes rust-lang#64050.
Mark-Simulacrum added a commit to Mark-Simulacrum/rust that referenced this issue Sep 6, 2019
…050, r=alexcrichton

Rename test locals to work around LLDB bug

LLDB's expression parser can't unambiguously resolve local variables in
some cases, as described in rust-lang#47938. Work around this by using names that
don't shadow direct submodules of `core`.

Closes rust-lang#64050.
@bors bors closed this as completed in 83e2b5e Sep 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant