public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug compile/31581] New: Expr crashes on assignments to register pointer
@ 2024-03-31 12:03 tsqurt at outlook dot com
0 siblings, 0 replies; only message in thread
From: tsqurt at outlook dot com @ 2024-03-31 12:03 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=31581
Bug ID: 31581
Summary: Expr crashes on assignments to register pointer
Product: gdb
Version: HEAD
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: compile
Assignee: unassigned at sourceware dot org
Reporter: tsqurt at outlook dot com
Target Milestone: ---
void use(void *) {}
int main () {
int a[] = {3, 4};
register int *b;
b = a; // <- break here
use(b);
return 0;
}
GDB crashes running `expr b = a`. If b is not declared as "register",
everything goes well.
gcc a.c -g && gdb ./a.out
Reading symbols from ./a.out...
(gdb) b 7
Breakpoint 1 at 0x401116: file a.c, line 7.
(gdb) run
Starting program: a.out
Breakpoint 1, main () at a.c:7
7 b = a; // <- break here and compile this expression
(gdb) expr b = a
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7ffb04a in _gdb_expr (__regs=0x7ffff7fc7000) at gdb command line:1
warning: 1 gdb command line: No such file or directory
The program being debugged was signaled while in a function called from GDB.
GDB remains in the frame where the signal was received.
To change this behavior use "set unwindonsignal on".
Evaluation of the expression containing the function
(_gdb_expr) will be abandoned.
When the function is done executing, GDB will silently stop.
(gdb)
Affected versions: GNU gdb (GDB) 13.2, 14.2, 15.0.50.20240331-git
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-03-31 12:03 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-31 12:03 [Bug compile/31581] New: Expr crashes on assignments to register pointer tsqurt at outlook dot com
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).