diff options
author | Daniel Jacobowitz <drow@false.org> | 2006-06-10 17:56:57 +0000 |
---|---|---|
committer | Daniel Jacobowitz <drow@false.org> | 2006-06-10 17:56:57 +0000 |
commit | b947bb69e1b37816af0fb80d49641017d856c57a (patch) | |
tree | fc2212583720de14afee653ec9e9c6462eac1885 | |
parent | c1304ecafc6d7a253f608650b95521ec18a12bbf (diff) | |
download | fsf-binutils-gdb-b947bb69e1b37816af0fb80d49641017d856c57a.zip fsf-binutils-gdb-b947bb69e1b37816af0fb80d49641017d856c57a.tar.gz fsf-binutils-gdb-b947bb69e1b37816af0fb80d49641017d856c57a.tar.bz2 |
* remote-fileio.c (remote_fileio_func_read): Limit consolegdb-csl-sourcerygxx-4_1-8
reads to 8K.
-rw-r--r-- | ChangeLog.csl | 7 | ||||
-rw-r--r-- | gdb/remote-fileio.c | 11 |
2 files changed, 17 insertions, 1 deletions
diff --git a/ChangeLog.csl b/ChangeLog.csl index bf3c87b..aace2cc 100644 --- a/ChangeLog.csl +++ b/ChangeLog.csl @@ -1,3 +1,10 @@ +2006-06-10 Daniel Jacobowitz <dan@codesourcery.com> + + Issue #669 + gdb/ + * remote-fileio.c (remote_fileio_func_read): Limit console + reads to 8K. + 2006-06-09 Nathan Sidwell <nathan@codesourcery.com> gdb/testsuite/ diff --git a/gdb/remote-fileio.c b/gdb/remote-fileio.c index 952c318..e819527 100644 --- a/gdb/remote-fileio.c +++ b/gdb/remote-fileio.c @@ -751,7 +751,16 @@ remote_fileio_func_read (char *buf) } else { - ret = ui_file_read (gdb_stdtargin, (char *) buffer, 32767); + /* NOTE drow/2006-06-10: Windows (mingw32) has a truly + bizarre bug. If a handle is backed by a real console + device, overly large reads from the console will fail + and set errno == ENOMEM. On a Windows Server 2003 + system where I tested, reading 26608 bytes from the + console was OK, but anything about 26609 bytes would + fail. So, we limit this read to something smaller + than that - by a safe margin, in case the limit + depends on system resources or version. */ + ret = ui_file_read (gdb_stdtargin, (char *) buffer, 8191); remote_fio_no_longjmp = 1; if (ret > 0 && (size_t)ret > length) { |