* linux-x86-low.c (ps_get_thread_area): Properly extend address to

64 bits in 64-cross-32 environment.
This commit is contained in:
Doug Evans
2013-05-31 19:14:33 +00:00
parent f60cf82f20
commit d1ec4ce7c9
2 changed files with 7 additions and 1 deletions

View File

@@ -196,7 +196,8 @@ ps_get_thread_area (const struct ps_prochandle *ph,
(void *) (intptr_t) idx, (unsigned long) &desc) < 0)
return PS_ERR;
*(int *)base = desc[1];
/* Ensure we properly extend the value to 64-bits for x86_64. */
*base = (void *) (uintptr_t) desc[1];
return PS_OK;
}
}