+2014-11-24 Samuel Thibault <samuel.thibault@ens-lyon.org>
+
+ Pushed by Joel Brobecker <brobecker@adacore.com>
+ * gdb/gnu-nat.c (inf_validate_procinfo): Multiply the number of
+ elements pi_len by the size of the elements before calling
+ vm_deallocate.
+ (inf_validate_task_sc): Likewise, and properly deallocate the
+ noise array.
+
2014-11-23 Doug Evans <xdje42@gmail.com>
* gdbtypes.c (print_args): Renamed from print_arg_types. Print arg
inf->nomsg = !!(pi->state & PI_NOMSG);
if (inf->nomsg)
inf->traced = !!(pi->state & PI_TRACED);
- vm_deallocate (mach_task_self (), (vm_address_t) pi, pi_len);
+ vm_deallocate (mach_task_self (), (vm_address_t) pi,
+ pi_len * sizeof (*(procinfo_t) 0));
if (noise_len > 0)
vm_deallocate (mach_task_self (), (vm_address_t) noise, noise_len);
}
suspend_count = pi->taskinfo.suspend_count;
- vm_deallocate (mach_task_self (), (vm_address_t) pi, pi_len);
+ vm_deallocate (mach_task_self (), (vm_address_t) pi,
+ pi_len * sizeof (*(procinfo_t) 0));
if (noise_len > 0)
- vm_deallocate (mach_task_self (), (vm_address_t) pi, pi_len);
+ vm_deallocate (mach_task_self (), (vm_address_t) noise, noise_len);
if (inf->task->cur_sc < suspend_count)
{