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
https://sourceware.org/ml/gdb-patches/2013-11/msg00655.html
(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.
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.