From c98b19b722ba9c044b7fde55a98a8a1eb8bf3439 Mon Sep 17 00:00:00 2001 From: Vyacheslav Egorov Date: Fri, 30 Nov 2018 11:12:49 +0100 Subject: [PATCH 1/3] Pass operator_new_alignment value through gn script into GN args. Background: Some allocators (tcmalloc) don't provide alignment guarantees that match clang's default expectations, which causes crashes when using clang compiled binary with such allocators. For example clang can produce movaps instructions to initialize newly allocated object - which would crash if result of ::operator new() is not 16 bytes aligned. --- tools/gn | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/gn b/tools/gn index 7bc0fafca87b6..93d6de9489b15 100755 --- a/tools/gn +++ b/tools/gn @@ -93,6 +93,9 @@ def to_gn_args(args): gn_args['embedder_for_target'] = args.embedder_for_target + if args.operator_new_alignment is not None: + gn_args['operator_new_alignment'] = args.operator_new_alignment + enable_lto = args.lto if args.unoptimized: # There is no point in enabling LTO in unoptimized builds. @@ -252,6 +255,7 @@ def parse_args(args): parser.add_argument('--target-toolchain', type=str) parser.add_argument('--target-triple', type=str) parser.add_argument('--toolchain-prefix', type=str) + parser.add_argument('--operator-new-alignment', dest='operator_new_alignment', type=str, default=None) parser.add_argument('--enable-vulkan', action='store_true', default=False) From adc30dcb0496e77fa6a674a8d90b6eb346d2af1f Mon Sep 17 00:00:00 2001 From: Vyacheslav Egorov Date: Tue, 15 Jan 2019 15:17:35 +0100 Subject: [PATCH 2/3] Roll buildroot to c98b19b722ba9c044b7fde55a98a8a1eb8bf3439 --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index ec64fb91f02bc..69d7c76c84a24 100644 --- a/DEPS +++ b/DEPS @@ -116,7 +116,7 @@ allowed_hosts = [ ] deps = { - 'src': 'https://github.com/flutter/buildroot.git' + '@' + '67befc4acace09d636db2f1f23e47719fa7e8795', + 'src': 'https://github.com/flutter/buildroot.git' + '@' + 'c98b19b722ba9c044b7fde55a98a8a1eb8bf3439', # Fuchsia compatibility # From 2c9e9c6aa85461ebe586c6ec5ef83ac0540992b1 Mon Sep 17 00:00:00 2001 From: Vyacheslav Egorov Date: Tue, 15 Jan 2019 15:20:16 +0100 Subject: [PATCH 3/3] Roll buildroot to 4a37279db248051cd25bbc93526c3001bdb8d785 --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 69d7c76c84a24..bb7940410784c 100644 --- a/DEPS +++ b/DEPS @@ -116,7 +116,7 @@ allowed_hosts = [ ] deps = { - 'src': 'https://github.com/flutter/buildroot.git' + '@' + 'c98b19b722ba9c044b7fde55a98a8a1eb8bf3439', + 'src': 'https://github.com/flutter/buildroot.git' + '@' + '4a37279db248051cd25bbc93526c3001bdb8d785', # Fuchsia compatibility #