1998-12-03 Jason Molenda (jsm@bugshack.cygnus.com)
* monitor.c (monitor_read_memory): Zero out pattern buffers
before calling re_search.
(parse_register_dump): Ditto.
PR 18049. This bug had existed erratically since I upgraded to
the new gnu-regex.c this last summer. The problem is mostly in
parse_register_dump; the allocated structure has some random values
in it and there is a flag set in the register_pattern structure by the
gnu-regex library which indicates that the values in the re_registers
should be trusted.
If those arbitrary contents aren't zero, gnu-regex tries to run realloc
on them and we get a core dump on some hosts for some targets when the
moon is just right.