sandbox: build if glibc 2.34+ dynamic stack size is enabled

Compilation of sandbox fails when using dynamic stack size in glibc
2.34 or newer. This is because the value is not a literal anymore but
obtained through sysconf.

To avoid this, use memset to put zeros in the buffer.

Change-Id: Ia479e0f799b77a10a00197aaaa0500e62546f458
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3436947
Reviewed-by: Jorge Lucangeli Obes <jorgelo@chromium.org>
Commit-Queue: José Dapena Paz <jdapena@igalia.com>
Cr-Commit-Position: refs/heads/main@{#967943}
NOKEYCHECK=True
GitOrigin-RevId: 28ac6a15411d01301e171b8a8b0019abd57589b9
diff --git a/linux/services/credentials.cc b/linux/services/credentials.cc
index ca6b595..c933eaf 100644
--- a/linux/services/credentials.cc
+++ b/linux/services/credentials.cc
@@ -100,7 +100,10 @@
   // TODO(crbug.com/1247458) Broken in MSan builds after LLVM f1bb30a4956f.
   clone_flags |= CLONE_VM | CLONE_VFORK | CLONE_SETTLS;
 
-  char tls_buf[PTHREAD_STACK_MIN] = {0};
+  // PTHREAD_STACK_MIN can be dynamic in glibc2.34+, so it is not possible to
+  // zeroify tls_buf assigning { 0 }
+  char tls_buf[PTHREAD_STACK_MIN];
+  memset(tls_buf, 0, PTHREAD_STACK_MIN);
   tls = tls_buf;
 #endif