]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
FreeBSD: a bit of cleaning of client stack creation
authorPaul Floyd <pjfloyd@wanadoo.fr>
Fri, 5 Dec 2025 20:44:56 +0000 (21:44 +0100)
committerPaul Floyd <pjfloyd@wanadoo.fr>
Fri, 5 Dec 2025 20:44:56 +0000 (21:44 +0100)
Remove some commented out rounding
Make stringbase point to a word boundary, not one before

coregrind/m_initimg/initimg-freebsd.c

index 09f3dda84741ef175b2dd8711c5a6aba81b804a0..cd127736ce196a5f4dc3052e60a29155be2fa34c 100644 (file)
@@ -473,17 +473,14 @@ static Addr setup_client_stack(const void*  init_sp,
          break;
       case VKI_AT_CANARYLEN:
          canarylen = cauxv->u.a_val;
-         /*VG_ROUNDUP(stringsize, sizeof(Word));*/
          stringsize += canarylen;
          break;
       case VKI_AT_PAGESIZESLEN:
          pagesizeslen = cauxv->u.a_val;
-         /*VG_ROUNDUP(stringsize, sizeof(Word));*/
          stringsize += pagesizeslen;
          break;
 #if 0
       case VKI_AT_TIMEKEEP:
-         /*VG_ROUNDUP(stringsize, sizeof(Word));*/
          stringsize += sizeof(struct vki_vdso_timehands);
          break;
 #endif
@@ -519,7 +516,7 @@ static Addr setup_client_stack(const void*  init_sp,
    client_SP = VG_ROUNDDN(client_SP, 16); /* make stack 16 byte aligned */
 
    /* base of the string table (aligned) */
-   stringbase = strtab = (HChar *)clstack_end
+   stringbase = strtab = (HChar *)clstack_end + 1
                          - VG_ROUNDUP(stringsize, sizeof(int));
 
    clstack_start = VG_PGROUNDDN(client_SP);