Skip to content

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

Closed
@ranweiler

Description

@ranweiler

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions