From d1deca6c120bf5087d22b506d8994884598a7987 Mon Sep 17 00:00:00 2001 From: Zeno Albisser Date: Tue, 11 Mar 2014 11:18:51 +0100 Subject: Always disable tcmalloc. We cannot enable tcmalloc as otherwise we would have to use it for all of Qt as well. If we allocate with tcmalloc and free without (or the other way round) this leads to errors. Specifically it led to something that looked like a double free corruption on embedded linux for an event that is created in qtwebengine code but deleted within Qt. Change-Id: Ia8c8da09e78968648046761e34f7f674769cfdc2 Reviewed-by: Jocelyn Turcotte Reviewed-by: Andras Becsi --- tools/buildscripts/gyp_qtwebengine | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'tools/buildscripts') diff --git a/tools/buildscripts/gyp_qtwebengine b/tools/buildscripts/gyp_qtwebengine index 12a6427d8..12eae72c6 100755 --- a/tools/buildscripts/gyp_qtwebengine +++ b/tools/buildscripts/gyp_qtwebengine @@ -96,10 +96,14 @@ if __name__ == '__main__': args.extend(['-I' + i for i in additional_include_files(args)]) + # We always have to disable tcmalloc. + # Allocating with tcmalloc in chromium code and freeing without + # tcmalloc outside of chromium code would cause erratic behavior. + args.extend(['-D', 'linux_use_tcmalloc=0']) + # On Mac we want to build in x64 mode. And we want to use libc++. - # Even though we are not on linux, it seems we specifically have to disable linux_use_tcmalloc. if sys.platform in ('darwin',) and not 'GYP_CROSSCOMPILE' in os.environ: - args.extend(['-D', 'host_arch=x64', '-D', 'use_libcpp=1', '-D', 'linux_use_tcmalloc=0']) + args.extend(['-D', 'host_arch=x64', '-D', 'use_libcpp=1']) # There shouldn't be a circular dependency relationship between .gyp files, # but in Chromium's .gyp files, on non-Mac platforms, circular relationships -- cgit v1.2.3