Bug 18062 - Infinite loop when single-step out of syscall
Summary: Infinite loop when single-step out of syscall
Status: NEW
Alias: None
Product: gdb
Classification: Unclassified
Component: breakpoints (show other bugs)
Version: HEAD
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-02-28 15:23 UTC by patrick
Modified: 2015-02-28 15:24 UTC (History)
0 users

See Also:
Host: x86_64-unknown-linux-gnu
Target: x86_64-unknown-linux-gnu
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description patrick 2015-02-28 15:23:03 UTC
When the inferior is stopped inside a syscall (e.g. poll), single-stepping out of this syscall (via "step") causes GDB to loop and to slowly consume more and more memory.  This can easily be seen when debugging GDB with GDB:

$ gdb gdb
(gdb) run
Starting program: /scratchpad/binutils-gdb-build/gdb/gdb 
(gdb) ^C
Program received signal SIGINT, Interrupt.
0x00007ffff6d784f0 in poll () from /lib/x86_64-linux-gnu/libc.so.6
(gdb) step 
Single stepping until exit from function poll,
which has no line number information.
<infinite loop here>