Bug 16193 - gdbserver aborts
Summary: gdbserver aborts
Status: RESOLVED FIXED
Alias: None
Product: gdb
Classification: Unclassified
Component: server (show other bugs)
Version: HEAD
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-20 14:10 UTC by Yao Qi
Modified: 2013-11-30 03:28 UTC (History)
1 user (show)

See Also:
Host: i686-pc-linux-gnu
Target: i686-pc-linux-gnu
Build: i686-pc-linux-gnu
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Yao Qi 2013-11-20 14:10:01 UTC
start gdbserver:
  ./gdbserver/gdbserver :1234 ./1.exe

and start gdb,
  ./gdb ./1.exe
  (gdb) target remote :1234
  (gdb) b main
  (gdb) c

then GDBserver aborts with the following error message:
memory clobbered past end of allocated block
Aborted

The stack backtrace is like:

(gdb) bt 20
#0  0xb7fff424 in __kernel_vsyscall ()
#1  0x4ce9f98f in raise () from /lib/libc.so.6
#2  0x4cea12d5 in abort () from /lib/libc.so.6
#3  0x4cee1b0a in __libc_message () from /lib/libc.so.6
#4  0x4cee1c34 in __libc_fatal () from /lib/libc.so.6
#5  0x4ceef130 in mabort () from /lib/libc.so.6
#6  0x4ceef23d in freehook () from /lib/libc.so.6
#7  0x4ceed47b in free () from /lib/libc.so.6
#8  0x0806751a in regsets_store_inferior_registers (regsets_info=0x8090fe4, regcache=0x8099440) at ../../../../git/gdb/gdbserver/linux-low.c:4155
#9  0x0806d69a in linux_store_registers (regcache=0x8099440, regno=-1) at ../../../../git/gdb/gdbserver/linux-low.c:4391
#10 0x0804d76c in regcache_invalidate_thread (thread=0x80993e8) at ../../../../git/gdb/gdbserver/regcache.c:82
#11 0x0806890e in linux_resume_one_lwp (info=0x0, signal=0, step=0, lwp=0x8099318) at ../../../../git/gdb/gdbserver/linux-low.c:3267
#12 linux_resume_one_lwp (lwp=0x8099318, step=0, signal=<optimized out>, info=0x0) at ../../../../git/gdb/gdbserver/linux-low.c:3096
#13 0x080692b0 in linux_resume_one_thread (entry=0x80993e8, arg=0xbfffecdc) at ../../../../git/gdb/gdbserver/linux-low.c:3722
#14 0x0804d3ca in find_inferior (list=0x8093f24, func=0x8069210 <linux_resume_one_thread>, arg=0xbfffecdc) at ../../../../git/gdb/gdbserver/inferiors.c:185
#15 0x08069154 in linux_resume (resume_info=0x8099930, n=1) at ../../../../git/gdb/gdbserver/linux-low.c:3803
#16 0x0805455d in handle_v_cont (own_buf=0x80951c8 "vCont;c") at ../../../../git/gdb/gdbserver/server.c:2134
#17 0x0805505f in process_serial_event () at ../../../../git/gdb/gdbserver/server.c:3529
#18 handle_serial_event (err=0, client_data=0x0) at ../../../../git/gdb/gdbserver/server.c:3577
#19 0x0805a698 in handle_file_event (event_file_desc=8) at ../../../../git/gdb/gdbserver/event-loop.c:434
Comment 2 Yao Qi 2013-11-22 00:41:03 UTC
(In reply to Pedro Alves from comment #1)
> https://sourceware.org/ml/gdb-patches/2013-11/msg00655.html

This abort appears after MPX patches are committed.  If I back out the whole MPX series, GDBserver works fine.
Comment 3 Yao Qi 2013-11-30 03:28:03 UTC
This bug was fixed by this commit https://sourceware.org/ml/gdb-cvs/2013-11/msg00083.html and the patch can be found https://sourceware.org/ml/gdb-patches/2013-11/msg00799.html

Close it.