Bug 21449 - segfault when running -data-list-register-values x on rust executable
Summary: segfault when running -data-list-register-values x on rust executable
Status: RESOLVED FIXED
Alias: None
Product: gdb
Classification: Unclassified
Component: rust (show other bugs)
Version: 8.0
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
: 21450 (view as bug list)
Depends on:
Blocks:
 
Reported: 2017-05-01 06:04 UTC by grassfedcode
Modified: 2017-05-18 23:42 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments
strace of the gdb session and eventual segfault (47.89 KB, text/plain)
2017-05-01 06:04 UTC, grassfedcode
Details

Note You need to log in before you can comment on or make changes to this bug.
Description grassfedcode 2017-05-01 06:04:42 UTC
Created attachment 10035 [details]
strace of the gdb session and eventual segfault

A segfault occurs in `-data-list-register-values x` when stopped in a rust executable. See https://github.com/cs01/gdbgui/issues/64. This was confirmed by o11c and simark in the #gdb irc channel.

MI transcript: 
-file-exec-and-symbols /home/chad/git/gdbgui/examples/rust.a\n-break-insert /home/chad/git/gdbgui/examples/hello.rs:15\n-exec-run\n-data-list-register-values x\n

Rust source file: https://raw.githubusercontent.com/cs01/gdbgui/master/examples/hello.rs
makefile: https://github.com/cs01/gdbgui/blob/master/examples/makefile

The kernel log reports
[ 4467.187888] gdb[13609]: segfault at 0 ip 00000000006489ed sp 00007ffc0a0ce260 error 4 in gdb[400000+617000]

The bug was fixed in gdb's git repository, commit b96645f1a1e608 "Add support for untagged unions in Rust", but is present in version 7.12 and 7.12.1. 

Seems similar to a bug #8150, which is old and is likely not related since this occurs only on Rust executables.
Comment 1 Tom Tromey 2017-05-18 23:35:23 UTC
*** Bug 21450 has been marked as a duplicate of this bug. ***
Comment 2 Tom Tromey 2017-05-18 23:42:19 UTC
> The bug was fixed in gdb's git repository, commit b96645f1a1e608 "Add support for untagged unions in Rust", but is present in version 7.12 and 7.12.1. 

I think there won't be another 7.12.x release, so I'm closing this,
since I understand it to be fixed for 8.0.
If this is in error, please reopen, thanks.