-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
chromium-94-glibc-2.34.patch
24 lines (20 loc) · 1017 Bytes
/
chromium-94-glibc-2.34.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
diff -up chromium-95.0.4638.17/sandbox/linux/services/credentials.cc.28~ chromium-95.0.4638.17/sandbox/linux/services/credentials.cc
--- chromium-95.0.4638.17/sandbox/linux/services/credentials.cc.28~ 2021-09-21 21:04:46.000000000 +0200
+++ chromium-95.0.4638.17/sandbox/linux/services/credentials.cc 2021-09-25 16:23:01.646102987 +0200
@@ -100,7 +100,8 @@ bool ChrootToSafeEmptyDir() {
// 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};
+ char *tls_buf = new char[PTHREAD_STACK_MIN];
+ memset(tls_buf, 0, PTHREAD_STACK_MIN);
tls = tls_buf;
#endif
@@ -111,6 +112,10 @@ bool ChrootToSafeEmptyDir() {
int status = -1;
PCHECK(HANDLE_EINTR(waitpid(pid, &status, 0)) == pid);
+#if (defined(ARCH_CPU_X86_64) || defined(ARCH_CPU_ARM_FAMILY)) && \
+ !defined(MEMORY_SANITIZER)
+ delete[] tls_buf;
+#endif
return WIFEXITED(status) && WEXITSTATUS(status) == kExitSuccess;
}