commit f274866ee24165f68c0a5d1556ddf494902b0dd0
Author: Kevin Kofler <kevin.kofler(a)chello.at>
Date: Mon Jun 26 00:28:43 2017 +0200
Fix broken binary compatibility for C memory management functions
* Sun Jun 25 2017 Kevin Kofler <Kevin(a)tigcc.ticalc.org> - 5.9.0-2
- Fix broken binary compatibility for C memory management functions (incomplete
upstream fix for QTBUG-60565)
qt5-qtwebengine-freeworld.spec | 10 +-
...pensource-src-5.9.0-qtbug-60565-c-symbols.patch | 162 +++++++++++++++++++++
2 files changed, 171 insertions(+), 1 deletion(-)
---
diff --git a/qt5-qtwebengine-freeworld.spec b/qt5-qtwebengine-freeworld.spec
index 2ef9dec..d6e9646 100644
--- a/qt5-qtwebengine-freeworld.spec
+++ b/qt5-qtwebengine-freeworld.spec
@@ -44,7 +44,7 @@
Summary: Qt5 - QtWebEngine components (freeworld version)
Name: qt5-qtwebengine-freeworld
Version: 5.9.0
-Release: 1%{?dist}
+Release: 2%{?dist}
%global major_minor %(echo %{version} | cut -d. -f-2)
%global major %(echo %{version} | cut -d. -f1)
@@ -99,6 +99,9 @@ Patch20: qtwebengine-opensource-src-5.8.0-qt57.patch
Patch21: qtwebengine-opensource-src-5.9.0-gn-bootstrap-verbose.patch
# Fix src/3rdparty/chromium/build/linux/unbundle/re2.gn
Patch22: qtwebengine-opensource-src-5.9.0-system-re2.patch
+# Fix broken binary compatibility for C memory management functions (incomplete
+# upstream fix for QTBUG-60565)
+Patch23: qtwebengine-opensource-src-5.9.0-qtbug-60565-c-symbols.patch
# Backport upstream patch to fix GN FTBFS on aarch64 (QTBUG-61128)
#
https://codereview.qt-project.org/196178
Patch100: qtwebengine-opensource-src-5.9.0-gn-aarch64.patch
@@ -329,6 +332,7 @@ This version is compiled with support for patent-encumbered codecs
enabled.
%patch20 -p1 -b .qt57
%patch21 -p1 -b .gn-bootstrap-verbose
%patch22 -p1 -b .system-re2
+%patch23 -p1 -b .qtbug-60565-c-symbols
%patch100 -p1 -b .gn-aarch64
%patch101 -p1 -b .aarch64-gcc-toolchain
# fix // in #include in content/renderer/gpu to avoid debugedit failure
@@ -409,6 +413,10 @@ echo "%{_libdir}/%{name}" \
%config(noreplace) %{_sysconfdir}/ld.so.conf.d/%{name}-%{_arch}.conf
%changelog
+* Sun Jun 25 2017 Kevin Kofler <Kevin(a)tigcc.ticalc.org> - 5.9.0-2
+- Fix broken binary compatibility for C memory management functions (incomplete
+ upstream fix for QTBUG-60565)
+
* Sun Jun 18 2017 Kevin Kofler <Kevin(a)tigcc.ticalc.org> - 5.9.0-1
- Update to 5.9.0
- Update version numbers of bundled stuff
diff --git a/qtwebengine-opensource-src-5.9.0-qtbug-60565-c-symbols.patch
b/qtwebengine-opensource-src-5.9.0-qtbug-60565-c-symbols.patch
new file mode 100644
index 0000000..35edb0c
--- /dev/null
+++ b/qtwebengine-opensource-src-5.9.0-qtbug-60565-c-symbols.patch
@@ -0,0 +1,162 @@
+diff -ur qtwebengine-opensource-src-5.9.0/src/core/api/qtbug-60565.cpp
qtwebengine-opensource-src-5.9.0-qtbug-60565-c-symbols/src/core/api/qtbug-60565.cpp
+--- qtwebengine-opensource-src-5.9.0/src/core/api/qtbug-60565.cpp 2017-05-19
06:22:04.000000000 +0200
++++
qtwebengine-opensource-src-5.9.0-qtbug-60565-c-symbols/src/core/api/qtbug-60565.cpp 2017-06-25
22:33:28.508223362 +0200
+@@ -39,6 +39,8 @@
+
+ #include <new>
+ #include <unistd.h>
++#include <stdlib.h>
++#include <malloc.h>
+
+ #if defined(__LP64__)
+ # define SIZE_T_MANGLING "m"
+@@ -47,6 +49,7 @@
+ #endif
+
+ #define SHIM_ALIAS_SYMBOL(fn) __attribute__((weak, alias(#fn)))
++#define SHIM_HIDDEN __attribute__ ((visibility ("hidden")))
+
+ extern "C" {
+
+@@ -82,26 +85,100 @@
+ void __ShimCppDeleteArrayNoThrow(void* address, const std::nothrow_t&) noexcept
+ SHIM_ALIAS_SYMBOL(ShimCppDeleteArray);
+
++__asm__(".symver __ShimMalloc, malloc@Qt_5");
++void* __ShimMalloc(size_t size) noexcept
++ SHIM_ALIAS_SYMBOL(ShimMalloc);
++
++__asm__(".symver __ShimCalloc, calloc@Qt_5");
++void* __ShimCalloc(size_t n, size_t size) noexcept
++ SHIM_ALIAS_SYMBOL(ShimCalloc);
++
++__asm__(".symver __ShimRealloc, realloc@Qt_5");
++void* __ShimRealloc(void* address, size_t size) noexcept
++ SHIM_ALIAS_SYMBOL(ShimRealloc);
++
++__asm__(".symver __ShimMemalign, memalign@Qt_5");
++void* __ShimMemalign(size_t alignment, size_t size) noexcept
++ SHIM_ALIAS_SYMBOL(ShimMemalign);
++
++__asm__(".symver __ShimPosixMemalign, posix_memalign@Qt_5");
++int __ShimPosixMemalign(void** res, size_t alignment, size_t size) noexcept
++ SHIM_ALIAS_SYMBOL(ShimPosixMemalign);
++
++__asm__(".symver __ShimValloc, valloc@Qt_5");
++void* __ShimValloc(size_t size) noexcept
++ SHIM_ALIAS_SYMBOL(ShimValloc);
++
++__asm__(".symver __ShimPvalloc, pvalloc@Qt_5");
++void* __ShimPvalloc(size_t size) noexcept
++ SHIM_ALIAS_SYMBOL(ShimPvalloc);
++
++__asm__(".symver __ShimFree, free@Qt_5");
++void __ShimFree(void* address) noexcept
++ SHIM_ALIAS_SYMBOL(ShimFree);
++
+ static void* __shimCppNew(size_t size);
+ static void* __shimCppNewArray(size_t size);
+ static void __shimCppDelete(void *address);
+ static void __shimCppDeleteArray(void *address);
++static void* __shimMalloc(size_t size) noexcept;
++static void* __shimCalloc(size_t n, size_t size) noexcept;
++static void* __shimRealloc(void* address, size_t size) noexcept;
++static void* __shimMemalign(size_t alignment, size_t size) noexcept;
++static int __shimPosixMemalign(void** res, size_t alignment, size_t size)
++ noexcept;
++static void* __shimValloc(size_t size) noexcept;
++static void* __shimPvalloc(size_t size) noexcept;
++static void __shimFree(void* address) noexcept;
+
+-static void* ShimCppNew(size_t size) {
++SHIM_HIDDEN void* ShimCppNew(size_t size) {
+ return __shimCppNew(size);
+ }
+
+-static void* ShimCppNewArray(size_t size) {
++SHIM_HIDDEN void* ShimCppNewArray(size_t size) {
+ return __shimCppNewArray(size);
+ }
+
+-static void ShimCppDelete(void* address) {
++SHIM_HIDDEN void ShimCppDelete(void* address) {
+ __shimCppDelete(address);
+ }
+
+-static void ShimCppDeleteArray(void* address) {
++SHIM_HIDDEN void ShimCppDeleteArray(void* address) {
+ __shimCppDeleteArray(address);
+ }
++
++SHIM_HIDDEN void* ShimMalloc(size_t size) noexcept {
++ return __shimMalloc(size);
++}
++
++SHIM_HIDDEN void* ShimCalloc(size_t n, size_t size) noexcept {
++ return __shimCalloc(n, size);
++}
++
++SHIM_HIDDEN void* ShimRealloc(void* address, size_t size) noexcept {
++ return __shimRealloc(address, size);
++}
++
++SHIM_HIDDEN void* ShimMemalign(size_t alignment, size_t size) noexcept {
++ return __shimMemalign(alignment, size);
++}
++
++SHIM_HIDDEN int ShimPosixMemalign(void** res, size_t alignment, size_t size)
++ noexcept {
++ return __shimPosixMemalign(res, alignment, size);
++}
++
++SHIM_HIDDEN void* ShimValloc(size_t size) noexcept {
++ return __shimValloc(size);
++}
++
++SHIM_HIDDEN void* ShimPvalloc(size_t size) noexcept {
++ return __shimPvalloc(size);
++}
++
++SHIM_HIDDEN void ShimFree(void* address) noexcept {
++ __shimFree(address);
++}
+ } // extern "C"
+
+ static void* __shimCppNew(size_t size) {
+@@ -119,3 +196,36 @@
+ static void __shimCppDeleteArray(void* address) {
+ operator delete[](address);
+ }
++
++static void* __shimMalloc(size_t size) noexcept {
++ return malloc(size);
++}
++
++static void* __shimCalloc(size_t n, size_t size) noexcept {
++ return calloc(n, size);
++}
++
++static void* __shimRealloc(void* address, size_t size) noexcept {
++ return realloc(address, size);
++}
++
++static void* __shimMemalign(size_t alignment, size_t size) noexcept {
++ return memalign(alignment, size);
++}
++
++static int __shimPosixMemalign(void** res, size_t alignment, size_t size)
++ noexcept {
++ return posix_memalign(res, alignment, size);
++}
++
++static void* __shimValloc(size_t size) noexcept {
++ return valloc(size);
++}
++
++static void* __shimPvalloc(size_t size) noexcept {
++ return pvalloc(size);
++}
++
++static void __shimFree(void* address) noexcept {
++ free(address);
++}