]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
FreeBSD: set client stack perms from ExeInfo
authorPaul Floyd <pjfloyd@wanadoo.fr>
Fri, 23 Feb 2024 12:23:56 +0000 (13:23 +0100)
committerPaul Floyd <pjfloyd@wanadoo.fr>
Fri, 23 Feb 2024 12:23:56 +0000 (13:23 +0100)
Was hard coded RWX, will now use PT_GNU_STACK from the elf
program headers, if present.

coregrind/m_initimg/initimg-freebsd.c

index 9210bfb5dfea46c592ad8b977cc63f70a9a65f63..7de1702ca796cca6c6c2421d996f9ed24ce5c2ec 100644 (file)
@@ -586,7 +586,7 @@ static Addr setup_client_stack(void*  init_sp,
          res = VG_(am_mmap_anon_fixed_client)(
                   anon_start -inner_HACK,
                   anon_size +inner_HACK,
-                  VKI_PROT_READ|VKI_PROT_WRITE|VKI_PROT_EXEC
+                  info->stack_prot
                );
       }
       if ((!ok) || sr_isError(res)) {