Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 3575C200CE9 for ; Sat, 5 Aug 2017 02:24:29 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 311AB16E7AC; Sat, 5 Aug 2017 00:24:29 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 7383916E7A8 for ; Sat, 5 Aug 2017 02:24:28 +0200 (CEST) Received: (qmail 14053 invoked by uid 500); 5 Aug 2017 00:24:27 -0000 Mailing-List: contact reviews-help@impala.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list reviews@impala.incubator.apache.org Received: (qmail 14042 invoked by uid 99); 5 Aug 2017 00:24:27 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 05 Aug 2017 00:24:27 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id D3310C2D9A for ; Sat, 5 Aug 2017 00:24:26 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.362 X-Spam-Level: X-Spam-Status: No, score=0.362 tagged_above=-999 required=6.31 tests=[RDNS_DYNAMIC=0.363, SPF_PASS=-0.001] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id pTwFrxANRmmJ for ; Sat, 5 Aug 2017 00:24:26 +0000 (UTC) Received: from ip-10-146-233-104.ec2.internal (ec2-75-101-130-251.compute-1.amazonaws.com [75.101.130.251]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id EC0125FBDF for ; Sat, 5 Aug 2017 00:24:25 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by ip-10-146-233-104.ec2.internal (8.14.4/8.14.4) with ESMTP id v750OOAH018021; Sat, 5 Aug 2017 00:24:24 GMT Message-Id: <201708050024.v750OOAH018021@ip-10-146-233-104.ec2.internal> Date: Sat, 5 Aug 2017 00:24:24 +0000 From: "Henry Robinson (Code Review)" To: impala-cr@cloudera.com, reviews@impala.incubator.apache.org CC: Tim Armstrong Reply-To: henry@cloudera.com X-Gerrit-MessageType: newpatchset Subject: =?UTF-8?Q?=5BImpala-ASF-CR=5D_IMPALA-5666=3A_ASAN_poisoning_for_MemPool_and_BufferPool=0A?= X-Gerrit-Change-Id: I8d5a28dfee2b7c631981aac75524bde9acc0b36a X-Gerrit-ChangeURL: X-Gerrit-Commit: 3768cd2833a9c561950c5d9d79ca0a6041d1ec6f In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Content-Disposition: inline User-Agent: Gerrit/2.12.7 archived-at: Sat, 05 Aug 2017 00:24:29 -0000 Henry Robinson has uploaded a new patch set (#2). Change subject: IMPALA-5666: ASAN poisoning for MemPool and BufferPool ...................................................................... IMPALA-5666: ASAN poisoning for MemPool and BufferPool "If you poison us, do we not die?" * Use ASAN_[UN]POISON_MEMORY_REGION to indicate to ASAN runtime that memory is not 'valid' from Impala's perspective (but still valid from kernel's perspective). * Add this to MemPool and BufferPoolAllocator. For both, memory goes through the following lifecycle: when it is allocated from the OS and returned to the user, it must be unpoisoned. When the user returns it to a cache, it becomes poisoned. When the cache is freed to the OS, it must be unpoisoned again (otherwise future allocations elsewhere in the system might return poisoned memory). * Also add checks to FreePool which uses a MemPool underneath, but has its own freelist cache. Fix a couple of bugs in free-pool-test that these checks uncovered. Testing: * Tests that only run if ASAN is enabled to confirm that poisoning catches simple use-after-return errors. These are 'death' tests which catch expected process exits. * Fix one bug found in StringFunctions::FindInSet which would read one byte past the end of a stringvalue. Change-Id: I8d5a28dfee2b7c631981aac75524bde9acc0b36a --- M be/src/exprs/string-functions-ir.cc M be/src/runtime/bufferpool/buffer-allocator-test.cc M be/src/runtime/bufferpool/buffer-allocator.cc M be/src/runtime/bufferpool/buffer-pool.h M be/src/runtime/bufferpool/free-list.h M be/src/runtime/free-pool-test.cc M be/src/runtime/free-pool.h M be/src/runtime/mem-pool-test.cc M be/src/runtime/mem-pool.cc M be/src/runtime/mem-pool.h 10 files changed, 146 insertions(+), 18 deletions(-) git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/91/7591/2 -- To view, visit http://gerrit.cloudera.org:8080/7591 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I8d5a28dfee2b7c631981aac75524bde9acc0b36a Gerrit-PatchSet: 2 Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-Owner: Henry Robinson Gerrit-Reviewer: Tim Armstrong