mirror of
https://github.com/outbackdingo/ports.git
synced 2026-03-22 01:44:52 +00:00
685 lines
34 KiB
Diff
685 lines
34 KiB
Diff
diff -ruN qt-everywhere-src-5.14.1-orig/qtwebengine/src/3rdparty/chromium/base/allocator/allocator_shim_default_dispatch_to_glibc.cc qt-everywhere-src-5.14.1/qtwebengine/src/3rdparty/chromium/base/allocator/allocator_shim_default_dispatch_to_glibc.cc
|
|
--- qt-everywhere-src-5.14.1-orig/qtwebengine/src/3rdparty/chromium/base/allocator/allocator_shim_default_dispatch_to_glibc.cc 2020-01-20 19:37:42.000000000 +0900
|
|
+++ qt-everywhere-src-5.14.1/qtwebengine/src/3rdparty/chromium/base/allocator/allocator_shim_default_dispatch_to_glibc.cc 2020-03-11 03:59:26.632401000 +0900
|
|
@@ -7,6 +7,7 @@
|
|
#include <dlfcn.h>
|
|
#include <malloc.h>
|
|
|
|
+#if defined(__GLIBC__)
|
|
// This translation unit defines a default dispatch for the allocator shim which
|
|
// routes allocations to libc functions.
|
|
// The code here is strongly inspired from tcmalloc's libc_override_glibc.h.
|
|
@@ -84,3 +85,92 @@
|
|
nullptr, /* aligned_free_function */
|
|
nullptr, /* next */
|
|
};
|
|
+
|
|
+#else // defined(__GLIBC__)
|
|
+
|
|
+#include <dlfcn.h>
|
|
+
|
|
+extern "C" {
|
|
+// Declare function pointers to the memory functions
|
|
+typedef void* (*t_libc_malloc)(size_t size);
|
|
+typedef void* (*t_libc_calloc)(size_t n, size_t size);
|
|
+typedef void* (*t_libc_realloc)(void* address, size_t size);
|
|
+typedef void* (*t_libc_memalign)(size_t alignment, size_t size);
|
|
+typedef void (*t_libc_free)(void* ptr);
|
|
+typedef size_t (*t_libc_malloc_usable_size)(void* ptr);
|
|
+
|
|
+// Static instances of pointers to libc.so dl symbols
|
|
+static t_libc_malloc libc_malloc = NULL;
|
|
+static t_libc_calloc libc_calloc = NULL;
|
|
+static t_libc_realloc libc_realloc = NULL;
|
|
+static t_libc_memalign libc_memalign = NULL;
|
|
+static t_libc_free libc_free = NULL;
|
|
+static t_libc_malloc_usable_size libc_malloc_usable_size = NULL;
|
|
+
|
|
+// resolve the symbols in libc.so
|
|
+void musl_libc_memory_init(void)
|
|
+{
|
|
+ libc_malloc = (t_libc_malloc) dlsym(RTLD_NEXT, "malloc");
|
|
+ libc_calloc = (t_libc_calloc) dlsym(RTLD_NEXT, "calloc");
|
|
+ libc_realloc = (t_libc_realloc) dlsym(RTLD_NEXT, "realloc");
|
|
+ libc_memalign = (t_libc_memalign) dlsym(RTLD_NEXT, "memalign");
|
|
+ libc_free = (t_libc_free) dlsym(RTLD_NEXT, "free");
|
|
+ libc_malloc_usable_size = (t_libc_malloc_usable_size) dlsym(RTLD_NEXT, "malloc_usable_size");
|
|
+}
|
|
+} // extern "C"
|
|
+
|
|
+namespace {
|
|
+
|
|
+using base::allocator::AllocatorDispatch;
|
|
+
|
|
+void* MuslMalloc(const AllocatorDispatch*, size_t size, void* context) {
|
|
+ if (!libc_malloc)
|
|
+ musl_libc_memory_init();
|
|
+ return (*libc_malloc)(size);
|
|
+}
|
|
+
|
|
+void* MuslCalloc(const AllocatorDispatch*, size_t n, size_t size, void* context) {
|
|
+ if (!libc_calloc)
|
|
+ musl_libc_memory_init();
|
|
+ return (*libc_calloc)(n, size);
|
|
+}
|
|
+
|
|
+void* MuslRealloc(const AllocatorDispatch*, void* address, size_t size, void* context) {
|
|
+ if (!libc_realloc)
|
|
+ musl_libc_memory_init();
|
|
+ return (*libc_realloc)(address, size);
|
|
+}
|
|
+
|
|
+void* MuslMemalign(const AllocatorDispatch*, size_t alignment, size_t size, void* context) {
|
|
+ if (!libc_memalign)
|
|
+ musl_libc_memory_init();
|
|
+ return (*libc_memalign)(alignment, size);
|
|
+}
|
|
+
|
|
+void MuslFree(const AllocatorDispatch*, void* address, void* context) {
|
|
+ if (!libc_free)
|
|
+ musl_libc_memory_init();
|
|
+ (*libc_free)(address);
|
|
+}
|
|
+
|
|
+size_t MuslGetSizeEstimate(const AllocatorDispatch*, void* address, void* context) {
|
|
+ // TODO(siggi, primiano): malloc_usable_size may need redirection in the
|
|
+ // presence of interposing shims that divert allocations.
|
|
+ if (!libc_malloc_usable_size)
|
|
+ musl_libc_memory_init();
|
|
+ return (*libc_malloc_usable_size)(address);
|
|
+}
|
|
+
|
|
+} // namespace
|
|
+
|
|
+const AllocatorDispatch AllocatorDispatch::default_dispatch = {
|
|
+ &MuslMalloc, /* alloc_function */
|
|
+ &MuslCalloc, /* alloc_zero_initialized_function */
|
|
+ &MuslMemalign, /* alloc_aligned_function */
|
|
+ &MuslRealloc, /* realloc_function */
|
|
+ &MuslFree, /* free_function */
|
|
+ &MuslGetSizeEstimate, /* get_size_estimate_function */
|
|
+ nullptr, /* next */
|
|
+};
|
|
+
|
|
+#endif
|
|
diff -ruN qt-everywhere-src-5.14.1-orig/qtwebengine/src/3rdparty/chromium/base/debug/stack_trace.cc qt-everywhere-src-5.14.1/qtwebengine/src/3rdparty/chromium/base/debug/stack_trace.cc
|
|
--- qt-everywhere-src-5.14.1-orig/qtwebengine/src/3rdparty/chromium/base/debug/stack_trace.cc 2020-01-20 19:37:42.000000000 +0900
|
|
+++ qt-everywhere-src-5.14.1/qtwebengine/src/3rdparty/chromium/base/debug/stack_trace.cc 2020-03-11 03:59:26.653401000 +0900
|
|
@@ -233,14 +233,14 @@
|
|
}
|
|
std::string StackTrace::ToStringWithPrefix(const char* prefix_string) const {
|
|
std::stringstream stream;
|
|
-#if !defined(__UCLIBC__) && !defined(_AIX)
|
|
+#if defined(__GLIBC__) && !defined(_AIX)
|
|
OutputToStreamWithPrefix(&stream, prefix_string);
|
|
#endif
|
|
return stream.str();
|
|
}
|
|
|
|
std::ostream& operator<<(std::ostream& os, const StackTrace& s) {
|
|
-#if !defined(__UCLIBC__) & !defined(_AIX)
|
|
+#if defined(__GLIBC__) & !defined(_AIX)
|
|
s.OutputToStream(&os);
|
|
#else
|
|
os << "StackTrace::OutputToStream not implemented.";
|
|
diff -ruN qt-everywhere-src-5.14.1-orig/qtwebengine/src/3rdparty/chromium/base/debug/stack_trace_posix.cc qt-everywhere-src-5.14.1/qtwebengine/src/3rdparty/chromium/base/debug/stack_trace_posix.cc
|
|
--- qt-everywhere-src-5.14.1-orig/qtwebengine/src/3rdparty/chromium/base/debug/stack_trace_posix.cc 2020-01-20 19:37:42.000000000 +0900
|
|
+++ qt-everywhere-src-5.14.1/qtwebengine/src/3rdparty/chromium/base/debug/stack_trace_posix.cc 2020-03-11 03:59:26.653401000 +0900
|
|
@@ -27,7 +27,7 @@
|
|
#if !defined(USE_SYMBOLIZE)
|
|
#include <cxxabi.h>
|
|
#endif
|
|
-#if !defined(__UCLIBC__) && !defined(_AIX)
|
|
+#if defined(__GLIBC__) && !defined(_AIX)
|
|
#include <execinfo.h>
|
|
#endif
|
|
|
|
@@ -88,7 +88,7 @@
|
|
// Note: code in this function is NOT async-signal safe (std::string uses
|
|
// malloc internally).
|
|
|
|
-#if !defined(__UCLIBC__) && !defined(_AIX)
|
|
+#if defined(__GLIBC__) && !defined(_AIX)
|
|
std::string::size_type search_from = 0;
|
|
while (search_from < text->size()) {
|
|
// Look for the start of a mangled symbol, from search_from.
|
|
@@ -123,7 +123,7 @@
|
|
search_from = mangled_start + 2;
|
|
}
|
|
}
|
|
-#endif // !defined(__UCLIBC__) && !defined(_AIX)
|
|
+#endif // defined(__GLIBC__) && !defined(_AIX)
|
|
}
|
|
#endif // !defined(USE_SYMBOLIZE)
|
|
|
|
@@ -135,7 +135,7 @@
|
|
virtual ~BacktraceOutputHandler() = default;
|
|
};
|
|
|
|
-#if !defined(__UCLIBC__) && !defined(_AIX)
|
|
+#if defined(__GLIBC__) && !defined(_AIX)
|
|
void OutputPointer(void* pointer, BacktraceOutputHandler* handler) {
|
|
// This should be more than enough to store a 64-bit number in hex:
|
|
// 16 hex digits + 1 for null-terminator.
|
|
@@ -218,7 +218,7 @@
|
|
}
|
|
#endif // defined(USE_SYMBOLIZE)
|
|
}
|
|
-#endif // !defined(__UCLIBC__) && !defined(_AIX)
|
|
+#endif // defined(__GLIBC__) && !defined(_AIX)
|
|
|
|
void PrintToStderr(const char* output) {
|
|
// NOTE: This code MUST be async-signal safe (it's used by in-process
|
|
@@ -834,7 +834,7 @@
|
|
// NOTE: This code MUST be async-signal safe (it's used by in-process
|
|
// stack dumping signal handler). NO malloc or stdio is allowed here.
|
|
|
|
-#if !defined(__UCLIBC__) && !defined(_AIX)
|
|
+#if defined(__GLIBC__) && !defined(_AIX)
|
|
// Though the backtrace API man page does not list any possible negative
|
|
// return values, we take no chance.
|
|
return base::saturated_cast<size_t>(backtrace(trace, count));
|
|
@@ -847,13 +847,13 @@
|
|
// NOTE: This code MUST be async-signal safe (it's used by in-process
|
|
// stack dumping signal handler). NO malloc or stdio is allowed here.
|
|
|
|
-#if !defined(__UCLIBC__) && !defined(_AIX)
|
|
+#if defined(__GLIBC__) && !defined(_AIX)
|
|
PrintBacktraceOutputHandler handler;
|
|
ProcessBacktrace(trace_, count_, prefix_string, &handler);
|
|
#endif
|
|
}
|
|
|
|
-#if !defined(__UCLIBC__) && !defined(_AIX)
|
|
+#if defined(__GLIBC__) && !defined(_AIX)
|
|
void StackTrace::OutputToStreamWithPrefix(std::ostream* os,
|
|
const char* prefix_string) const {
|
|
StreamBacktraceOutputHandler handler(os);
|
|
diff -ruN qt-everywhere-src-5.14.1-orig/qtwebengine/src/3rdparty/chromium/base/logging.cc qt-everywhere-src-5.14.1/qtwebengine/src/3rdparty/chromium/base/logging.cc
|
|
--- qt-everywhere-src-5.14.1-orig/qtwebengine/src/3rdparty/chromium/base/logging.cc 2020-01-20 19:37:42.000000000 +0900
|
|
+++ qt-everywhere-src-5.14.1/qtwebengine/src/3rdparty/chromium/base/logging.cc 2020-03-11 03:59:26.662401000 +0900
|
|
@@ -618,7 +618,7 @@
|
|
|
|
LogMessage::~LogMessage() {
|
|
size_t stack_start = stream_.tellp();
|
|
-#if !defined(OFFICIAL_BUILD) && !defined(OS_NACL) && !defined(__UCLIBC__) && \
|
|
+#if !defined(OFFICIAL_BUILD) && !defined(OS_NACL) && defined(__GLIBC__) && \
|
|
!defined(OS_AIX)
|
|
if (severity_ == LOG_FATAL && !base::debug::BeingDebugged()) {
|
|
// Include a stack trace on a fatal, unless a debugger is attached.
|
|
diff -ruN qt-everywhere-src-5.14.1-orig/qtwebengine/src/3rdparty/chromium/base/process/process_metrics_posix.cc qt-everywhere-src-5.14.1/qtwebengine/src/3rdparty/chromium/base/process/process_metrics_posix.cc
|
|
--- qt-everywhere-src-5.14.1-orig/qtwebengine/src/3rdparty/chromium/base/process/process_metrics_posix.cc 2020-01-20 19:37:42.000000000 +0900
|
|
+++ qt-everywhere-src-5.14.1/qtwebengine/src/3rdparty/chromium/base/process/process_metrics_posix.cc 2020-03-11 03:59:26.698401001 +0900
|
|
@@ -109,14 +109,14 @@
|
|
malloc_statistics_t stats = {0};
|
|
malloc_zone_statistics(nullptr, &stats);
|
|
return stats.size_in_use;
|
|
-#elif defined(OS_LINUX) || defined(OS_ANDROID)
|
|
+#elif (defined(OS_LINUX) && defined(__GLIBC__)) || defined(OS_ANDROID)
|
|
struct mallinfo minfo = mallinfo();
|
|
#if defined(USE_TCMALLOC)
|
|
return minfo.uordblks;
|
|
#else
|
|
return minfo.hblkhd + minfo.arena;
|
|
#endif
|
|
-#elif defined(OS_FUCHSIA)
|
|
+#else //if defined(OS_FUCHSIA) // also musl doesn't do this.
|
|
// TODO(fuchsia): Not currently exposed. https://crbug.com/735087.
|
|
return 0;
|
|
#endif
|
|
diff -ruN qt-everywhere-src-5.14.1-orig/qtwebengine/src/3rdparty/chromium/base/trace_event/malloc_dump_provider.cc qt-everywhere-src-5.14.1/qtwebengine/src/3rdparty/chromium/base/trace_event/malloc_dump_provider.cc
|
|
--- qt-everywhere-src-5.14.1-orig/qtwebengine/src/3rdparty/chromium/base/trace_event/malloc_dump_provider.cc 2020-01-20 19:37:42.000000000 +0900
|
|
+++ qt-everywhere-src-5.14.1/qtwebengine/src/3rdparty/chromium/base/trace_event/malloc_dump_provider.cc 2020-03-11 03:59:26.663401000 +0900
|
|
@@ -132,7 +132,7 @@
|
|
}
|
|
#elif defined(OS_FUCHSIA)
|
|
// TODO(fuchsia): Port, see https://crbug.com/706592.
|
|
-#else
|
|
+#elif defined(__GLIBC__)
|
|
struct mallinfo info = mallinfo();
|
|
DCHECK_GE(info.arena + info.hblkhd, info.uordblks);
|
|
|
|
@@ -144,6 +144,8 @@
|
|
|
|
// Total allocated space is given by |uordblks|.
|
|
allocated_objects_size = info.uordblks;
|
|
+#else
|
|
+// musl libc does not support mallinfo()
|
|
#endif
|
|
|
|
MemoryAllocatorDump* outer_dump = pmd->CreateAllocatorDump("malloc");
|
|
diff -ruN qt-everywhere-src-5.14.1-orig/qtwebengine/src/3rdparty/chromium/net/dns/dns_config_service_posix.cc qt-everywhere-src-5.14.1/qtwebengine/src/3rdparty/chromium/net/dns/dns_config_service_posix.cc
|
|
--- qt-everywhere-src-5.14.1-orig/qtwebengine/src/3rdparty/chromium/net/dns/dns_config_service_posix.cc 2020-01-20 19:37:42.000000000 +0900
|
|
+++ qt-everywhere-src-5.14.1/qtwebengine/src/3rdparty/chromium/net/dns/dns_config_service_posix.cc 2020-03-11 03:59:26.701401001 +0900
|
|
@@ -8,6 +8,10 @@
|
|
#include <string>
|
|
#include <type_traits>
|
|
|
|
+#if !defined(__GLIBC__)
|
|
+#include "resolv_compat.h"
|
|
+#endif
|
|
+
|
|
#include "base/bind.h"
|
|
#include "base/files/file.h"
|
|
#include "base/files/file_path.h"
|
|
diff -ruN qt-everywhere-src-5.14.1-orig/qtwebengine/src/3rdparty/chromium/net/dns/dns_reloader.cc qt-everywhere-src-5.14.1/qtwebengine/src/3rdparty/chromium/net/dns/dns_reloader.cc
|
|
--- qt-everywhere-src-5.14.1-orig/qtwebengine/src/3rdparty/chromium/net/dns/dns_reloader.cc 2020-01-20 19:37:42.000000000 +0900
|
|
+++ qt-everywhere-src-5.14.1/qtwebengine/src/3rdparty/chromium/net/dns/dns_reloader.cc 2020-03-11 03:59:26.700401001 +0900
|
|
@@ -9,6 +9,10 @@
|
|
|
|
#include <resolv.h>
|
|
|
|
+#if !defined(__GLIBC__)
|
|
+#include "resolv_compat.h"
|
|
+#endif
|
|
+
|
|
#include "base/lazy_instance.h"
|
|
#include "base/logging.h"
|
|
#include "base/macros.h"
|
|
diff -ruN qt-everywhere-src-5.14.1-orig/qtwebengine/src/3rdparty/chromium/net/dns/resolv_compat.h qt-everywhere-src-5.14.1/qtwebengine/src/3rdparty/chromium/net/dns/resolv_compat.h
|
|
--- qt-everywhere-src-5.14.1-orig/qtwebengine/src/3rdparty/chromium/net/dns/resolv_compat.h 1970-01-01 09:00:00.000000000 +0900
|
|
+++ qt-everywhere-src-5.14.1/qtwebengine/src/3rdparty/chromium/net/dns/resolv_compat.h 2020-03-11 03:59:26.701401001 +0900
|
|
@@ -0,0 +1,29 @@
|
|
+#if !defined(__GLIBC__)
|
|
+/***************************************************************************
|
|
+ * resolv_compat.h
|
|
+ *
|
|
+ * Mimick GLIBC's res_ninit() and res_nclose() for musl libc
|
|
+ * Note: res_init() is actually deprecated according to
|
|
+ * http://docs.oracle.com/cd/E36784_01/html/E36875/res-nclose-3resolv.html
|
|
+ **************************************************************************/
|
|
+#include <string.h>
|
|
+
|
|
+static inline int res_ninit(res_state statp)
|
|
+{
|
|
+ int rc = res_init();
|
|
+ if (statp != &_res) {
|
|
+ memcpy(statp, &_res, sizeof(*statp));
|
|
+ }
|
|
+ return rc;
|
|
+}
|
|
+
|
|
+static inline int res_nclose(res_state statp)
|
|
+{
|
|
+ if (!statp)
|
|
+ return -1;
|
|
+ if (statp != &_res) {
|
|
+ memset(statp, 0, sizeof(*statp));
|
|
+ }
|
|
+ return 0;
|
|
+}
|
|
+#endif
|
|
diff -ruN qt-everywhere-src-5.14.1-orig/qtwebengine/src/3rdparty/chromium/net/socket/udp_socket_posix.cc qt-everywhere-src-5.14.1/qtwebengine/src/3rdparty/chromium/net/socket/udp_socket_posix.cc
|
|
--- qt-everywhere-src-5.14.1-orig/qtwebengine/src/3rdparty/chromium/net/socket/udp_socket_posix.cc 2020-01-20 19:37:42.000000000 +0900
|
|
+++ qt-everywhere-src-5.14.1/qtwebengine/src/3rdparty/chromium/net/socket/udp_socket_posix.cc 2020-03-11 03:59:26.708401001 +0900
|
|
@@ -1191,7 +1191,7 @@
|
|
msg_iov->push_back({const_cast<char*>(buffer->data()), buffer->length()});
|
|
msgvec->reserve(buffers.size());
|
|
for (size_t j = 0; j < buffers.size(); j++)
|
|
- msgvec->push_back({{nullptr, 0, &msg_iov[j], 1, nullptr, 0, 0}, 0});
|
|
+ msgvec->push_back({{nullptr, 0, &msg_iov[j], 1, 0, 0, 0}, 0});
|
|
int result = HANDLE_EINTR(Sendmmsg(fd, &msgvec[0], buffers.size(), 0));
|
|
SendResult send_result(0, 0, std::move(buffers));
|
|
if (result < 0) {
|
|
diff -ruN qt-everywhere-src-5.14.1-orig/qtwebengine/src/3rdparty/chromium/ppapi/utility/threading/simple_thread.cc qt-everywhere-src-5.14.1/qtwebengine/src/3rdparty/chromium/ppapi/utility/threading/simple_thread.cc
|
|
--- qt-everywhere-src-5.14.1-orig/qtwebengine/src/3rdparty/chromium/ppapi/utility/threading/simple_thread.cc 2020-01-20 19:37:42.000000000 +0900
|
|
+++ qt-everywhere-src-5.14.1/qtwebengine/src/3rdparty/chromium/ppapi/utility/threading/simple_thread.cc 2020-03-11 03:59:26.705401001 +0900
|
|
@@ -13,7 +13,7 @@
|
|
namespace {
|
|
|
|
// Use 2MB default stack size for Native Client, otherwise use system default.
|
|
-#if defined(__native_client__)
|
|
+#if defined(__native_client__) || !defined(__GLIBC__)
|
|
const size_t kDefaultStackSize = 2 * 1024 * 1024;
|
|
#else
|
|
const size_t kDefaultStackSize = 0;
|
|
diff -ruN qt-everywhere-src-5.14.1-orig/qtwebengine/src/3rdparty/chromium/sandbox/linux/seccomp-bpf/trap.cc qt-everywhere-src-5.14.1/qtwebengine/src/3rdparty/chromium/sandbox/linux/seccomp-bpf/trap.cc
|
|
--- qt-everywhere-src-5.14.1-orig/qtwebengine/src/3rdparty/chromium/sandbox/linux/seccomp-bpf/trap.cc 2020-01-20 19:37:42.000000000 +0900
|
|
+++ qt-everywhere-src-5.14.1/qtwebengine/src/3rdparty/chromium/sandbox/linux/seccomp-bpf/trap.cc 2020-03-11 03:59:26.702401001 +0900
|
|
@@ -25,6 +25,11 @@
|
|
#include "sandbox/linux/system_headers/linux_seccomp.h"
|
|
#include "sandbox/linux/system_headers/linux_signal.h"
|
|
|
|
+// musl libc defines siginfo_t __si_fields instead of _sifields
|
|
+#if !defined(__GLIBC__)
|
|
+#define _sifields __si_fields
|
|
+#endif
|
|
+
|
|
namespace {
|
|
|
|
struct arch_sigsys {
|
|
diff -ruN qt-everywhere-src-5.14.1-orig/qtwebengine/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc qt-everywhere-src-5.14.1/qtwebengine/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc
|
|
--- qt-everywhere-src-5.14.1-orig/qtwebengine/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc 2020-01-20 19:37:42.000000000 +0900
|
|
+++ qt-everywhere-src-5.14.1/qtwebengine/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc 2020-03-11 03:59:26.706401001 +0900
|
|
@@ -139,21 +139,11 @@
|
|
// present (as in newer versions of posix_spawn).
|
|
ResultExpr RestrictCloneToThreadsAndEPERMFork() {
|
|
const Arg<unsigned long> flags(0);
|
|
-
|
|
- // TODO(mdempsky): Extend DSL to support (flags & ~mask1) == mask2.
|
|
- const uint64_t kAndroidCloneMask = CLONE_VM | CLONE_FS | CLONE_FILES |
|
|
- CLONE_SIGHAND | CLONE_THREAD |
|
|
- CLONE_SYSVSEM;
|
|
- const uint64_t kObsoleteAndroidCloneMask = kAndroidCloneMask | CLONE_DETACHED;
|
|
-
|
|
- const uint64_t kGlibcPthreadFlags =
|
|
- CLONE_VM | CLONE_FS | CLONE_FILES | CLONE_SIGHAND | CLONE_THREAD |
|
|
- CLONE_SYSVSEM | CLONE_SETTLS | CLONE_PARENT_SETTID | CLONE_CHILD_CLEARTID;
|
|
- const BoolExpr glibc_test = flags == kGlibcPthreadFlags;
|
|
-
|
|
- const BoolExpr android_test =
|
|
- AnyOf(flags == kAndroidCloneMask, flags == kObsoleteAndroidCloneMask,
|
|
- flags == kGlibcPthreadFlags);
|
|
+ const int required = CLONE_VM | CLONE_FS | CLONE_FILES | CLONE_SIGHAND |
|
|
+ CLONE_THREAD | CLONE_SYSVSEM;
|
|
+ const int safe = CLONE_SETTLS | CLONE_PARENT_SETTID | CLONE_CHILD_CLEARTID |
|
|
+ CLONE_DETACHED;
|
|
+ const BoolExpr thread_clone_ok = (flags&~safe)==required;
|
|
|
|
// The following two flags are the two important flags in any vfork-emulating
|
|
// clone call. EPERM any clone call that contains both of them.
|
|
@@ -163,7 +153,7 @@
|
|
AnyOf((flags & (CLONE_VM | CLONE_THREAD)) == 0,
|
|
(flags & kImportantCloneVforkFlags) == kImportantCloneVforkFlags);
|
|
|
|
- return If(IsAndroid() ? android_test : glibc_test, Allow())
|
|
+ return If(thread_clone_ok, Allow())
|
|
.ElseIf(is_fork_or_clone_vfork, Error(EPERM))
|
|
.Else(CrashSIGSYSClone());
|
|
}
|
|
diff -ruN qt-everywhere-src-5.14.1-orig/qtwebengine/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc qt-everywhere-src-5.14.1/qtwebengine/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
|
|
--- qt-everywhere-src-5.14.1-orig/qtwebengine/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc 2020-01-20 19:37:42.000000000 +0900
|
|
+++ qt-everywhere-src-5.14.1/qtwebengine/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc 2020-03-11 03:59:26.706401001 +0900
|
|
@@ -392,6 +392,7 @@
|
|
#if defined(__i386__)
|
|
case __NR_waitpid:
|
|
#endif
|
|
+ case __NR_set_tid_address:
|
|
return true;
|
|
case __NR_clone: // Should be parameter-restricted.
|
|
case __NR_setns: // Privileged.
|
|
@@ -404,7 +405,6 @@
|
|
#if defined(__i386__) || defined(__x86_64__) || defined(__mips__)
|
|
case __NR_set_thread_area:
|
|
#endif
|
|
- case __NR_set_tid_address:
|
|
case __NR_unshare:
|
|
#if !defined(__mips__) && !defined(__aarch64__)
|
|
case __NR_vfork:
|
|
@@ -514,6 +514,8 @@
|
|
case __NR_mlock:
|
|
case __NR_munlock:
|
|
case __NR_munmap:
|
|
+ case __NR_mremap:
|
|
+ case __NR_membarrier:
|
|
return true;
|
|
case __NR_madvise:
|
|
case __NR_mincore:
|
|
@@ -531,7 +533,6 @@
|
|
case __NR_modify_ldt:
|
|
#endif
|
|
case __NR_mprotect:
|
|
- case __NR_mremap:
|
|
case __NR_msync:
|
|
case __NR_munlockall:
|
|
case __NR_readahead:
|
|
diff -ruN qt-everywhere-src-5.14.1-orig/qtwebengine/src/3rdparty/chromium/sandbox/linux/system_headers/arm64_linux_syscalls.h qt-everywhere-src-5.14.1/qtwebengine/src/3rdparty/chromium/sandbox/linux/system_headers/arm64_linux_syscalls.h
|
|
--- qt-everywhere-src-5.14.1-orig/qtwebengine/src/3rdparty/chromium/sandbox/linux/system_headers/arm64_linux_syscalls.h 2020-01-20 19:37:42.000000000 +0900
|
|
+++ qt-everywhere-src-5.14.1/qtwebengine/src/3rdparty/chromium/sandbox/linux/system_headers/arm64_linux_syscalls.h 2020-03-11 03:59:26.706401001 +0900
|
|
@@ -1063,4 +1063,8 @@
|
|
#define __NR_memfd_create 279
|
|
#endif
|
|
|
|
+#if !defined(__NR_membarrier)
|
|
+#define __NR_membarrier 283
|
|
+#endif
|
|
+
|
|
#endif // SANDBOX_LINUX_SYSTEM_HEADERS_ARM64_LINUX_SYSCALLS_H_
|
|
diff -ruN qt-everywhere-src-5.14.1-orig/qtwebengine/src/3rdparty/chromium/sandbox/linux/system_headers/arm_linux_syscalls.h qt-everywhere-src-5.14.1/qtwebengine/src/3rdparty/chromium/sandbox/linux/system_headers/arm_linux_syscalls.h
|
|
--- qt-everywhere-src-5.14.1-orig/qtwebengine/src/3rdparty/chromium/sandbox/linux/system_headers/arm_linux_syscalls.h 2020-01-20 19:37:42.000000000 +0900
|
|
+++ qt-everywhere-src-5.14.1/qtwebengine/src/3rdparty/chromium/sandbox/linux/system_headers/arm_linux_syscalls.h 2020-03-11 03:59:26.706401001 +0900
|
|
@@ -1385,6 +1385,11 @@
|
|
#define __NR_memfd_create (__NR_SYSCALL_BASE+385)
|
|
#endif
|
|
|
|
+#if !defined(__NR_membarrier)
|
|
+#define __NR_membarrier (__NR_SYSCALL_BASE+389)
|
|
+#endif
|
|
+
|
|
+
|
|
// ARM private syscalls.
|
|
#if !defined(__ARM_NR_BASE)
|
|
#define __ARM_NR_BASE (__NR_SYSCALL_BASE + 0xF0000)
|
|
diff -ruN qt-everywhere-src-5.14.1-orig/qtwebengine/src/3rdparty/chromium/sandbox/linux/system_headers/mips64_linux_syscalls.h qt-everywhere-src-5.14.1/qtwebengine/src/3rdparty/chromium/sandbox/linux/system_headers/mips64_linux_syscalls.h
|
|
--- qt-everywhere-src-5.14.1-orig/qtwebengine/src/3rdparty/chromium/sandbox/linux/system_headers/mips64_linux_syscalls.h 2020-01-20 19:37:42.000000000 +0900
|
|
+++ qt-everywhere-src-5.14.1/qtwebengine/src/3rdparty/chromium/sandbox/linux/system_headers/mips64_linux_syscalls.h 2020-03-11 03:59:26.707401001 +0900
|
|
@@ -1271,4 +1271,8 @@
|
|
#define __NR_memfd_create (__NR_Linux + 314)
|
|
#endif
|
|
|
|
+#if !defined(__NR_membarrier)
|
|
+#define __NR_membarrier (__NR_Linux + 318)
|
|
+#endif
|
|
+
|
|
#endif // SANDBOX_LINUX_SYSTEM_HEADERS_MIPS64_LINUX_SYSCALLS_H_
|
|
diff -ruN qt-everywhere-src-5.14.1-orig/qtwebengine/src/3rdparty/chromium/sandbox/linux/system_headers/mips_linux_syscalls.h qt-everywhere-src-5.14.1/qtwebengine/src/3rdparty/chromium/sandbox/linux/system_headers/mips_linux_syscalls.h
|
|
--- qt-everywhere-src-5.14.1-orig/qtwebengine/src/3rdparty/chromium/sandbox/linux/system_headers/mips_linux_syscalls.h 2020-01-20 19:37:42.000000000 +0900
|
|
+++ qt-everywhere-src-5.14.1/qtwebengine/src/3rdparty/chromium/sandbox/linux/system_headers/mips_linux_syscalls.h 2020-03-11 03:59:26.707401001 +0900
|
|
@@ -1433,4 +1433,8 @@
|
|
#define __NR_memfd_create (__NR_Linux + 354)
|
|
#endif
|
|
|
|
+#if !defined(__NR_membarrier)
|
|
+#define __NR_membarrier (__NR_Linux + 358)
|
|
+#endif
|
|
+
|
|
#endif // SANDBOX_LINUX_SYSTEM_HEADERS_MIPS_LINUX_SYSCALLS_H_
|
|
diff -ruN qt-everywhere-src-5.14.1-orig/qtwebengine/src/3rdparty/chromium/sandbox/linux/system_headers/x86_32_linux_syscalls.h qt-everywhere-src-5.14.1/qtwebengine/src/3rdparty/chromium/sandbox/linux/system_headers/x86_32_linux_syscalls.h
|
|
--- qt-everywhere-src-5.14.1-orig/qtwebengine/src/3rdparty/chromium/sandbox/linux/system_headers/x86_32_linux_syscalls.h 2020-01-20 19:37:42.000000000 +0900
|
|
+++ qt-everywhere-src-5.14.1/qtwebengine/src/3rdparty/chromium/sandbox/linux/system_headers/x86_32_linux_syscalls.h 2020-03-11 03:59:26.707401001 +0900
|
|
@@ -1422,5 +1422,10 @@
|
|
#define __NR_memfd_create 356
|
|
#endif
|
|
|
|
+#if !defined(__NR_membarrier)
|
|
+#define __NR_membarrier 375
|
|
+#endif
|
|
+
|
|
+
|
|
#endif // SANDBOX_LINUX_SYSTEM_HEADERS_X86_32_LINUX_SYSCALLS_H_
|
|
|
|
diff -ruN qt-everywhere-src-5.14.1-orig/qtwebengine/src/3rdparty/chromium/sandbox/linux/system_headers/x86_64_linux_syscalls.h qt-everywhere-src-5.14.1/qtwebengine/src/3rdparty/chromium/sandbox/linux/system_headers/x86_64_linux_syscalls.h
|
|
--- qt-everywhere-src-5.14.1-orig/qtwebengine/src/3rdparty/chromium/sandbox/linux/system_headers/x86_64_linux_syscalls.h 2020-01-20 19:37:42.000000000 +0900
|
|
+++ qt-everywhere-src-5.14.1/qtwebengine/src/3rdparty/chromium/sandbox/linux/system_headers/x86_64_linux_syscalls.h 2020-03-11 03:59:26.707401001 +0900
|
|
@@ -1290,5 +1290,10 @@
|
|
#define __NR_memfd_create 319
|
|
#endif
|
|
|
|
+#if !defined(__NR_membarrier)
|
|
+#define __NR_membarrier 324
|
|
+#endif
|
|
+
|
|
+
|
|
#endif // SANDBOX_LINUX_SYSTEM_HEADERS_X86_64_LINUX_SYSCALLS_H_
|
|
|
|
diff -ruN qt-everywhere-src-5.14.1-orig/qtwebengine/src/3rdparty/chromium/services/service_manager/sandbox/linux/bpf_renderer_policy_linux.cc qt-everywhere-src-5.14.1/qtwebengine/src/3rdparty/chromium/services/service_manager/sandbox/linux/bpf_renderer_policy_linux.cc
|
|
--- qt-everywhere-src-5.14.1-orig/qtwebengine/src/3rdparty/chromium/services/service_manager/sandbox/linux/bpf_renderer_policy_linux.cc 2020-01-20 19:37:42.000000000 +0900
|
|
+++ qt-everywhere-src-5.14.1/qtwebengine/src/3rdparty/chromium/services/service_manager/sandbox/linux/bpf_renderer_policy_linux.cc 2020-03-11 03:59:26.709401001 +0900
|
|
@@ -88,10 +88,16 @@
|
|
case __NR_sysinfo:
|
|
case __NR_times:
|
|
case __NR_uname:
|
|
+#if !defined(__GLIBC__)
|
|
+ case __NR_sched_getparam:
|
|
+ case __NR_sched_getscheduler:
|
|
+#endif
|
|
return Allow();
|
|
case __NR_sched_getaffinity:
|
|
+#if defined(__GLIBC__)
|
|
case __NR_sched_getparam:
|
|
case __NR_sched_getscheduler:
|
|
+#endif
|
|
case __NR_sched_setscheduler:
|
|
return sandbox::RestrictSchedTarget(GetPolicyPid(), sysno);
|
|
case __NR_prlimit64:
|
|
diff -ruN qt-everywhere-src-5.14.1-orig/qtwebengine/src/3rdparty/chromium/third_party/blink/renderer/platform/wtf/stack_util.cc qt-everywhere-src-5.14.1/qtwebengine/src/3rdparty/chromium/third_party/blink/renderer/platform/wtf/stack_util.cc
|
|
--- qt-everywhere-src-5.14.1-orig/qtwebengine/src/3rdparty/chromium/third_party/blink/renderer/platform/wtf/stack_util.cc 2020-01-20 19:37:42.000000000 +0900
|
|
+++ qt-everywhere-src-5.14.1/qtwebengine/src/3rdparty/chromium/third_party/blink/renderer/platform/wtf/stack_util.cc 2020-03-11 03:59:26.705401001 +0900
|
|
@@ -29,7 +29,7 @@
|
|
// FIXME: On Mac OSX and Linux, this method cannot estimate stack size
|
|
// correctly for the main thread.
|
|
|
|
-#if defined(__GLIBC__) || defined(OS_ANDROID) || defined(OS_FREEBSD) || \
|
|
+#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_FREEBSD) || \
|
|
defined(OS_FUCHSIA)
|
|
// pthread_getattr_np() can fail if the thread is not invoked by
|
|
// pthread_create() (e.g., the main thread of blink_unittests).
|
|
@@ -97,7 +97,7 @@
|
|
}
|
|
|
|
void* GetStackStart() {
|
|
-#if defined(__GLIBC__) || defined(OS_ANDROID) || defined(OS_FREEBSD) || \
|
|
+#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_FREEBSD) || \
|
|
defined(OS_FUCHSIA)
|
|
pthread_attr_t attr;
|
|
int error;
|
|
diff -ruN qt-everywhere-src-5.14.1-orig/qtwebengine/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.cc qt-everywhere-src-5.14.1/qtwebengine/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.cc
|
|
--- qt-everywhere-src-5.14.1-orig/qtwebengine/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.cc 2020-01-20 19:37:42.000000000 +0900
|
|
+++ qt-everywhere-src-5.14.1/qtwebengine/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.cc 2020-03-11 03:59:26.702401001 +0900
|
|
@@ -49,7 +49,7 @@
|
|
}
|
|
|
|
void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext_t *uc,
|
|
- const struct _libc_fpstate* fp) {
|
|
+ const struct _fpstate* fp) {
|
|
const greg_t* regs = uc->uc_mcontext.gregs;
|
|
|
|
out->context_flags = MD_CONTEXT_X86_FULL |
|
|
@@ -97,7 +97,7 @@
|
|
}
|
|
|
|
void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext_t *uc,
|
|
- const struct _libc_fpstate* fpregs) {
|
|
+ const struct _fpstate* fpregs) {
|
|
const greg_t* regs = uc->uc_mcontext.gregs;
|
|
|
|
out->context_flags = MD_CONTEXT_AMD64_FULL;
|
|
diff -ruN qt-everywhere-src-5.14.1-orig/qtwebengine/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.h qt-everywhere-src-5.14.1/qtwebengine/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.h
|
|
--- qt-everywhere-src-5.14.1-orig/qtwebengine/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.h 2020-01-20 19:37:42.000000000 +0900
|
|
+++ qt-everywhere-src-5.14.1/qtwebengine/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.h 2020-03-11 03:59:26.703401001 +0900
|
|
@@ -50,7 +50,7 @@
|
|
// info: the collection of register structures.
|
|
#if defined(__i386__) || defined(__x86_64)
|
|
static void FillCPUContext(RawContextCPU *out, const ucontext_t *uc,
|
|
- const struct _libc_fpstate* fp);
|
|
+ const struct _fpstate* fp);
|
|
#elif defined(__aarch64__)
|
|
static void FillCPUContext(RawContextCPU *out, const ucontext_t *uc,
|
|
const struct fpsimd_context* fpregs);
|
|
diff -ruN qt-everywhere-src-5.14.1-orig/qtwebengine/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer.h qt-everywhere-src-5.14.1/qtwebengine/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer.h
|
|
--- qt-everywhere-src-5.14.1-orig/qtwebengine/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer.h 2020-01-20 19:37:42.000000000 +0900
|
|
+++ qt-everywhere-src-5.14.1/qtwebengine/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer.h 2020-03-11 03:59:26.703401001 +0900
|
|
@@ -48,7 +48,7 @@
|
|
#if defined(__aarch64__)
|
|
typedef struct fpsimd_context fpstate_t;
|
|
#elif !defined(__ARM_EABI__) && !defined(__mips__)
|
|
-typedef struct _libc_fpstate fpstate_t;
|
|
+typedef struct _fpstate fpstate_t;
|
|
#endif
|
|
|
|
// These entries store a list of memory regions that the client wants included
|
|
diff -ruN qt-everywhere-src-5.14.1-orig/qtwebengine/src/3rdparty/chromium/third_party/breakpad/breakpad/src/common/linux/elf_core_dump.h qt-everywhere-src-5.14.1/qtwebengine/src/3rdparty/chromium/third_party/breakpad/breakpad/src/common/linux/elf_core_dump.h
|
|
--- qt-everywhere-src-5.14.1-orig/qtwebengine/src/3rdparty/chromium/third_party/breakpad/breakpad/src/common/linux/elf_core_dump.h 2020-01-20 19:37:42.000000000 +0900
|
|
+++ qt-everywhere-src-5.14.1/qtwebengine/src/3rdparty/chromium/third_party/breakpad/breakpad/src/common/linux/elf_core_dump.h 2020-03-11 03:59:26.705401001 +0900
|
|
@@ -36,6 +36,9 @@
|
|
#include <elf.h>
|
|
#include <link.h>
|
|
#include <stddef.h>
|
|
+#ifndef __GLIBC__
|
|
+#include <sys/reg.h>
|
|
+#endif
|
|
|
|
#include "common/memory_range.h"
|
|
|
|
diff -ruN qt-everywhere-src-5.14.1-orig/qtwebengine/src/3rdparty/chromium/third_party/lss/linux_syscall_support.h qt-everywhere-src-5.14.1/qtwebengine/src/3rdparty/chromium/third_party/lss/linux_syscall_support.h
|
|
--- qt-everywhere-src-5.14.1-orig/qtwebengine/src/3rdparty/chromium/third_party/lss/linux_syscall_support.h 2020-01-20 19:37:42.000000000 +0900
|
|
+++ qt-everywhere-src-5.14.1/qtwebengine/src/3rdparty/chromium/third_party/lss/linux_syscall_support.h 2020-03-11 03:59:26.705401001 +0900
|
|
@@ -1794,6 +1794,15 @@
|
|
/* End of s390/s390x definitions */
|
|
#endif
|
|
|
|
+#ifndef __GLIBC__
|
|
+ /* For Musl libc pread/pread is the same as pread64/pwrite64 */
|
|
+#ifndef __NR_pread
|
|
+#define __NR_pread __NR_pread64
|
|
+#endif
|
|
+#ifndef __NR_pwrite
|
|
+#define __NR_pwrite __NR_pwrite64
|
|
+#endif
|
|
+#endif /* ifndef __GLIBC__ */
|
|
|
|
/* After forking, we must make sure to only call system calls. */
|
|
#if defined(__BOUNDED_POINTERS__)
|
|
diff -ruN qt-everywhere-src-5.14.1-orig/qtwebengine/src/3rdparty/chromium/third_party/nasm/config/config-linux.h qt-everywhere-src-5.14.1/qtwebengine/src/3rdparty/chromium/third_party/nasm/config/config-linux.h
|
|
--- qt-everywhere-src-5.14.1-orig/qtwebengine/src/3rdparty/chromium/third_party/nasm/config/config-linux.h 2020-01-20 19:37:42.000000000 +0900
|
|
+++ qt-everywhere-src-5.14.1/qtwebengine/src/3rdparty/chromium/third_party/nasm/config/config-linux.h 2020-03-11 03:59:26.708401001 +0900
|
|
@@ -117,7 +117,7 @@
|
|
#define HAVE_ACCESS 1
|
|
|
|
/* Define to 1 if you have the `canonicalize_file_name' function. */
|
|
-#define HAVE_CANONICALIZE_FILE_NAME 1
|
|
+// #define HAVE_CANONICALIZE_FILE_NAME 1
|
|
|
|
/* Define to 1 if you have the `cpu_to_le16' intrinsic function. */
|
|
/* #undef HAVE_CPU_TO_LE16 */
|
|
diff -ruN qt-everywhere-src-5.14.1-orig/qtwebengine/src/3rdparty/chromium/third_party/ots/include/opentype-sanitiser.h qt-everywhere-src-5.14.1/qtwebengine/src/3rdparty/chromium/third_party/ots/include/opentype-sanitiser.h
|
|
--- qt-everywhere-src-5.14.1-orig/qtwebengine/src/3rdparty/chromium/third_party/ots/include/opentype-sanitiser.h 2020-01-20 19:37:42.000000000 +0900
|
|
+++ qt-everywhere-src-5.14.1/qtwebengine/src/3rdparty/chromium/third_party/ots/include/opentype-sanitiser.h 2020-03-11 03:59:26.699401001 +0900
|
|
@@ -21,6 +21,7 @@
|
|
#define ots_htons(x) _byteswap_ushort (x)
|
|
#else
|
|
#include <arpa/inet.h>
|
|
+#include <sys/types.h>
|
|
#include <stdint.h>
|
|
#define ots_ntohl(x) ntohl (x)
|
|
#define ots_ntohs(x) ntohs (x)
|
|
diff -ruN qt-everywhere-src-5.14.1-orig/qtwebengine/src/3rdparty/chromium/third_party/yasm/source/config/linux/config.h qt-everywhere-src-5.14.1/qtwebengine/src/3rdparty/chromium/third_party/yasm/source/config/linux/config.h
|
|
--- qt-everywhere-src-5.14.1-orig/qtwebengine/src/3rdparty/chromium/third_party/yasm/source/config/linux/config.h 2020-01-20 19:37:42.000000000 +0900
|
|
+++ qt-everywhere-src-5.14.1/qtwebengine/src/3rdparty/chromium/third_party/yasm/source/config/linux/config.h 2020-03-11 03:59:26.708401001 +0900
|
|
@@ -5,7 +5,7 @@
|
|
#define CPP_PROG "cc -E"
|
|
|
|
/* */
|
|
-#define ENABLE_NLS 1
|
|
+/* #undef ENABLE_NLS 1 */
|
|
|
|
/* Define to 1 if you have the `abort' function. */
|
|
#define HAVE_ABORT 1
|
|
diff -ruN qt-everywhere-src-5.14.1-orig/qtwebengine/src/3rdparty/chromium/v8/src/base/platform/platform-posix.cc qt-everywhere-src-5.14.1/qtwebengine/src/3rdparty/chromium/v8/src/base/platform/platform-posix.cc
|
|
--- qt-everywhere-src-5.14.1-orig/qtwebengine/src/3rdparty/chromium/v8/src/base/platform/platform-posix.cc 2020-01-20 19:37:42.000000000 +0900
|
|
+++ qt-everywhere-src-5.14.1/qtwebengine/src/3rdparty/chromium/v8/src/base/platform/platform-posix.cc 2020-03-11 03:59:26.706401001 +0900
|
|
@@ -773,7 +773,7 @@
|
|
#if V8_OS_MACOSX
|
|
// Default on Mac OS X is 512kB -- bump up to 1MB
|
|
stack_size = 1 * 1024 * 1024;
|
|
-#elif V8_OS_AIX
|
|
+#elif V8_OS_AIX || !defined(__GLIBC__)
|
|
// Default on AIX is 96kB -- bump up to 2MB
|
|
stack_size = 2 * 1024 * 1024;
|
|
#endif
|
|
diff -ruN qt-everywhere-src-5.14.1-orig/qtwebengine/src/core/api/qtbug-61521.cpp qt-everywhere-src-5.14.1/qtwebengine/src/core/api/qtbug-61521.cpp
|
|
--- qt-everywhere-src-5.14.1-orig/qtwebengine/src/core/api/qtbug-61521.cpp 2020-01-20 20:17:16.000000000 +0900
|
|
+++ qt-everywhere-src-5.14.1/qtwebengine/src/core/api/qtbug-61521.cpp 2020-03-11 03:59:26.699401001 +0900
|
|
@@ -111,7 +111,11 @@
|
|
}
|
|
|
|
SHIM_HIDDEN void* ShimPvalloc(size_t size) {
|
|
+#if defined(__GLIBC__)
|
|
return pvalloc(size);
|
|
+#else
|
|
+ return valloc((size+4095)&~4095);
|
|
+#endif
|
|
}
|
|
|
|
SHIM_HIDDEN int ShimPosixMemalign(void** r, size_t a, size_t s) {
|