Differential D38165 Diff 118368 www/qt5-webengine/files/patch-src_3rdparty_chromium_base_allocator_allocator__shim__default__dispatch__to__glibc.cc
Changeset View
Changeset View
Standalone View
Standalone View
www/qt5-webengine/files/patch-src_3rdparty_chromium_base_allocator_allocator__shim__default__dispatch__to__glibc.cc
--- src/3rdparty/chromium/base/allocator/allocator_shim_default_dispatch_to_glibc.cc.orig 2019-11-27 21:12:25 UTC | --- src/3rdparty/chromium/base/allocator/allocator_shim_default_dispatch_to_glibc.cc.orig 2021-12-15 16:12:54 UTC | ||||
+++ src/3rdparty/chromium/base/allocator/allocator_shim_default_dispatch_to_glibc.cc | +++ src/3rdparty/chromium/base/allocator/allocator_shim_default_dispatch_to_glibc.cc | ||||
@@ -5,18 +5,28 @@ | @@ -6,18 +6,28 @@ | ||||
#include "base/allocator/allocator_shim.h" | #include "base/compiler_specific.h" | ||||
#include <dlfcn.h> | #include <dlfcn.h> | ||||
-#include <malloc.h> | -#include <malloc.h> | ||||
+#include <stdio.h> | +#include <stdio.h> | ||||
+#include <stdlib.h> | +#include <stdlib.h> | ||||
+#include <malloc_np.h> | +#include <malloc_np.h> | ||||
// This translation unit defines a default dispatch for the allocator shim which | // This translation unit defines a default dispatch for the allocator shim which | ||||
Show All 18 Lines | |||||
+ return ret; | + return ret; | ||||
+ } | + } | ||||
+} | +} | ||||
+int __posix_memalign(void **ptr, size_t alignment, size_t size); | +int __posix_memalign(void **ptr, size_t alignment, size_t size); | ||||
+void __free(void* ptr); | +void __free(void* ptr); | ||||
} // extern "C" | } // extern "C" | ||||
namespace { | namespace { | ||||
@@ -24,32 +34,32 @@ namespace { | @@ -25,32 +35,32 @@ void* GlibcMalloc(const AllocatorDispatch*, size_t siz | ||||
using base::allocator::AllocatorDispatch; | using base::allocator::AllocatorDispatch; | ||||
void* GlibcMalloc(const AllocatorDispatch*, size_t size, void* context) { | void* GlibcMalloc(const AllocatorDispatch*, size_t size, void* context) { | ||||
- return __libc_malloc(size); | - return __libc_malloc(size); | ||||
+ return __malloc(size); | + return __malloc(size); | ||||
} | } | ||||
void* GlibcCalloc(const AllocatorDispatch*, | void* GlibcCalloc(const AllocatorDispatch*, | ||||
Show All 20 Lines | |||||
+ return __memalign(alignment, size); | + return __memalign(alignment, size); | ||||
} | } | ||||
void GlibcFree(const AllocatorDispatch*, void* address, void* context) { | void GlibcFree(const AllocatorDispatch*, void* address, void* context) { | ||||
- __libc_free(address); | - __libc_free(address); | ||||
+ __free(address); | + __free(address); | ||||
} | } | ||||
size_t GlibcGetSizeEstimate(const AllocatorDispatch*, | NO_SANITIZE("cfi-icall") |