delve/pkg/proc/gdbserial
Alessandro Arzilli 4dc8aedc4d
proc/gdbserial: fix two protocol bugs (#2172)
During the testing of the core dump generation feature two bugs were
discovered in gdbserial:

1. we don't check that both bytes of the checksum are read, if the
   buffer only has one byte we can end up reading only one byte instead
   of two and the second byte will mess up the parsing of the next
   packet
2. binary encoded packets can start with an 'E' and not be errors, when
   using binary responses add an extra check for the lenght of the
   response before deciding that the response is an error.
   Unfortunately this encoding is inherently ambiguous (we can't
   distinguish a 3 byte response starting with 'E' from an error) so
   binary requests that lead to short responses should be avoided.

Testing this is complicated, they will be tested implicitly by the
upcoming core dump test.

Co-authored-by: a <a@kra>
2020-09-15 13:15:49 -07:00
..
gdbserver_conn.go proc/gdbserial: fix two protocol bugs (#2172) 2020-09-15 13:15:49 -07:00
gdbserver_unix.go *: FreeBSD initial support (#1480) 2019-07-12 18:28:04 -07:00
gdbserver_windows.go proc/native,proc/gdbserial: ignore SIGTTIN, SIGTTOU when fg'ing target 2018-07-31 12:05:54 -07:00
gdbserver.go proc/*,service: replace uses of uintptr with uint64 (#2163) 2020-09-09 10:36:15 -07:00
rr_test.go cmd,proc,terminal,debugger: Support default file descriptor redirects 2020-09-01 21:50:27 +02:00
rr.go cmd,proc,terminal,debugger: Support default file descriptor redirects 2020-09-01 21:50:27 +02:00