summary refs log tree commit diff
path: root/sysdeps/mach/hurd/ptrace.c
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2022-08-29 01:42:47 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2022-08-29 01:42:47 +0200
commit063f7462dac26487e38b126afcf80dad77da444c (patch)
tree8e515d0d1fef257d0a75120e0e0b607d5fb9fad3 /sysdeps/mach/hurd/ptrace.c
parentcb033e6b0ca7b8873cd00687ffd1828038a595d3 (diff)
downloadglibc-063f7462dac26487e38b126afcf80dad77da444c.tar.gz
glibc-063f7462dac26487e38b126afcf80dad77da444c.tar.xz
glibc-063f7462dac26487e38b126afcf80dad77da444c.zip
hurd: Fix vm_size_t incoherencies
In gnumach, 3e1702a65fb3 ("add rpc_versions for vm types") changed the type
of vm_size_t, making it always a unsigned long. This made it incompatible on
x86 with size_t. Even if we may want to revert it to unsigned int, it's
better to fix the types of parameters according to the .defs files.
Diffstat (limited to 'sysdeps/mach/hurd/ptrace.c')
-rw-r--r--sysdeps/mach/hurd/ptrace.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sysdeps/mach/hurd/ptrace.c b/sysdeps/mach/hurd/ptrace.c
index 9a32cd9a60..a043f325c5 100644
--- a/sysdeps/mach/hurd/ptrace.c
+++ b/sysdeps/mach/hurd/ptrace.c
@@ -47,8 +47,11 @@ ptrace (enum __ptrace_request request, ... )
     {
       /* Read the pages containing the addressed range.  */
       error_t err;
+      mach_msg_type_number_t nread;
       *size = round_page (addr + data) - trunc_page (addr);
-      err = __vm_read (task, trunc_page (addr), *size, ourpage, size);
+      err = __vm_read (task, trunc_page (addr), *size, ourpage, &nread);
+      if (!err)
+	*size = nread;
       return err;
     }