mirror of
https://github.com/Zenithsiz/ftmemsim-valgrind.git
synced 2026-02-03 10:05:29 +00:00
Disable auxv PAGESIZES workaround on FreeBSD 13
Leaving it in place for 11 (which is now EOL) and 12 - not woth the complexity for them. Improve comment for supporession. Also add a pointer to the illumos source web page for lwp_unlock_mutex in case the syswrap ever needs improving.
This commit is contained in:
parent
49d6d73c25
commit
01e05ea81c
@ -578,7 +578,7 @@ Addr setup_client_stack( void* init_sp,
|
||||
/* --- auxv --- */
|
||||
auxv = (struct auxv *)ptr;
|
||||
*client_auxv = (UInt *)auxv;
|
||||
#if defined(VGP_x86_freebsd)
|
||||
#if defined(VGP_x86_freebsd) && (VGO_freebsd <= FREEBSD_13)
|
||||
int* pagesizes = NULL;
|
||||
#endif
|
||||
|
||||
@ -610,6 +610,17 @@ Addr setup_client_stack( void* init_sp,
|
||||
* copies out the data for a sysctl sees this discrepancy and
|
||||
* sets an ENOMEM error. So guest execution doesn't even get past
|
||||
* executing the dynamic linker.
|
||||
*
|
||||
* This was fixed in the kernel in May 2020, see
|
||||
* https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=246215
|
||||
*
|
||||
* That means this workaround is not needed for
|
||||
* FreeBSD 13 or later, any version
|
||||
* FreeBSD 12 1201515 and later
|
||||
* FreeBSD 11 1104501 and later
|
||||
*
|
||||
* Because this is rather complicated I've just disabled the hack
|
||||
* for 13 and later
|
||||
*/
|
||||
|
||||
for (; orig_auxv->a_type != AT_NULL; auxv++, orig_auxv++) {
|
||||
@ -649,7 +660,7 @@ Addr setup_client_stack( void* init_sp,
|
||||
// case AT_CANARYLEN:
|
||||
// case AT_EXECPATH:
|
||||
// case AT_CANARY:
|
||||
#if defined(VGP_x86_freebsd)
|
||||
#if defined(VGP_x86_freebsd) && (VGO_freebsd <= FREEBSD_13)
|
||||
case AT_PAGESIZESLEN:
|
||||
if (!VG_(is32on64)()) {
|
||||
VG_(debugLog)(2, "initimg",
|
||||
|
||||
@ -10639,6 +10639,8 @@ PRE(sys_lwp_mutex_register)
|
||||
PRE(sys_lwp_mutex_unlock)
|
||||
{
|
||||
/* int lwp_mutex_unlock(lwp_mutex_t *lp); */
|
||||
/* see https://github.com/illumos/illumos-gate/blob/master/usr/src/uts/common/syscall/lwp_sobj.c#L3137-L3138
|
||||
* (illumos, obviously) */
|
||||
vki_lwp_mutex_t *lp = (vki_lwp_mutex_t*)ARG1;
|
||||
PRINT("sys_lwp_mutex_unlock ( %#lx )", ARG1);
|
||||
PRE_REG_READ1(int, "lwp_mutex_unlock", lwp_mutex_t *, lp);
|
||||
|
||||
@ -1,5 +1,9 @@
|
||||
# Suppressions for FreeBSD / Memcheck
|
||||
#This is a workaround for a bug in rtld
|
||||
|
||||
# This is a workaround for a bug in rtld / sysctl hw.pagesizes
|
||||
# it was fixed in May 2020 in the kernel
|
||||
# removing it means either waiting for 12-RELEASE EOL
|
||||
# or some tricky kernel detection in configure.ac
|
||||
{
|
||||
MEMCHECK-RTLD-32ON64
|
||||
Memcheck:Addr4
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user