qemu
qemu copied to clipboard
stack corruption in gdb_handle_packet
qemu was aborting due to stack corruption on OSX when using a remote gdb to print very large structures. The amount of memory being dumped was limited to MAX_PACKET_SIZE/2 but memtohex() also needs to append a trailing NUL byte for put_packet()'s strlen to work. That extra byte was corrupting the stack.