Return-Path: X-Original-To: apmail-hadoop-mapreduce-dev-archive@minotaur.apache.org Delivered-To: apmail-hadoop-mapreduce-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id BA6529FD8 for ; Fri, 24 Feb 2012 17:44:12 +0000 (UTC) Received: (qmail 88051 invoked by uid 500); 24 Feb 2012 17:44:12 -0000 Delivered-To: apmail-hadoop-mapreduce-dev-archive@hadoop.apache.org Received: (qmail 87958 invoked by uid 500); 24 Feb 2012 17:44:12 -0000 Mailing-List: contact mapreduce-dev-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: mapreduce-dev@hadoop.apache.org Delivered-To: mailing list mapreduce-dev@hadoop.apache.org Received: (qmail 87949 invoked by uid 99); 24 Feb 2012 17:44:11 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Feb 2012 17:44:11 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Feb 2012 17:44:09 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id BB8AD338855 for ; Fri, 24 Feb 2012 17:43:48 +0000 (UTC) Date: Fri, 24 Feb 2012 17:43:48 +0000 (UTC) From: "Charles Earl (Created) (JIRA)" To: mapreduce-dev@hadoop.apache.org Message-ID: <1296366146.15878.1330105428769.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Created] (MAPREDUCE-3914) Mismatched free() / delete / delete [] in HadoopPipes MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org Mismatched free() / delete / delete [] in HadoopPipes ----------------------------------------------------- Key: MAPREDUCE-3914 URL: https://issues.apache.org/jira/browse/MAPREDUCE-3914 Project: Hadoop Map/Reduce Issue Type: Bug Components: pipes Affects Versions: 0.20.205.0 Environment: Based upon map reduce pipes task executed on Ubuntu 11.10 Reporter: Charles Earl When running valgrind on a simple MapReduce pipes job, valgrind identifies a mismatched new / delete: ==20394== Mismatched free() / delete / delete [] ==20394== at 0x4C27FF2: operator delete(void*) (vg_replace_malloc.c:387) ==20394== by 0x4328A5: HadoopPipes::runTask(HadoopPipes::Factory const&) (HadoopPipes.cc:1171) ==20394== by 0x424C33: main (ProcessRow.cpp:118) ==20394== Address 0x9c5b540 is 0 bytes inside a block of size 131,072 alloc'd ==20394== at 0x4C2864B: operator new[](unsigned long) (vg_replace_malloc.c:305) ==20394== by 0x431E5D: HadoopPipes::runTask(HadoopPipes::Factory const&) (HadoopPipes.cc:1121) ==20394== by 0x424C33: main (ProcessRow.cpp:118) ==20394== ==20394== Mismatched free() / delete / delete [] ==20394== at 0x4C27FF2: operator delete(void*) (vg_replace_malloc.c:387) ==20394== by 0x4328AF: HadoopPipes::runTask(HadoopPipes::Factory const&) (HadoopPipes.cc:1172) ==20394== by 0x424C33: main (ProcessRow.cpp:118) ==20394== Address 0x9c7b580 is 0 bytes inside a block of size 131,072 alloc'd ==20394== at 0x4C2864B: operator new[](unsigned long) (vg_replace_malloc.c:305) ==20394== by 0x431E6A: HadoopPipes::runTask(HadoopPipes::Factory const&) (HadoopPipes.cc:1122) ==20394== by 0x424C33: main (ProcessRow.cpp:118) The new [] calls in Lines 1121 and 1122 of HadoopPipes.cc: bufin = new char[bufsize]; bufout = new char[bufsize]; should have matching delete [] calls but are instead bracketed my delete on lines 1171 and 1172: delete bufin; delete bufout; So these should be replaced by delete[] -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira