Return-Path: X-Original-To: apmail-hadoop-hdfs-issues-archive@minotaur.apache.org Delivered-To: apmail-hadoop-hdfs-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0EF79DDB3 for ; Sat, 3 Nov 2012 12:52:16 +0000 (UTC) Received: (qmail 41363 invoked by uid 500); 3 Nov 2012 12:52:15 -0000 Delivered-To: apmail-hadoop-hdfs-issues-archive@hadoop.apache.org Received: (qmail 41101 invoked by uid 500); 3 Nov 2012 12:52:15 -0000 Mailing-List: contact hdfs-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: hdfs-issues@hadoop.apache.org Delivered-To: mailing list hdfs-issues@hadoop.apache.org Received: (qmail 41054 invoked by uid 99); 3 Nov 2012 12:52:14 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 03 Nov 2012 12:52:14 +0000 Date: Sat, 3 Nov 2012 12:52:14 +0000 (UTC) From: "Hudson (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: <174073526.64690.1351947134373.JavaMail.jiratomcat@arcas> In-Reply-To: <1413475911.53589.1351723872564.JavaMail.jiratomcat@arcas> Subject: [jira] [Commented] (HDFS-4132) when libwebhdfs is not enabled, nativeMiniDfsClient frees uninitialized memory MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HDFS-4132?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13490012#comment-13490012 ] Hudson commented on HDFS-4132: ------------------------------ Integrated in Hadoop-Hdfs-trunk #1215 (See [https://builds.apache.org/job/Hadoop-Hdfs-trunk/1215/]) HDFS-4132. When libwebhdfs is not enabled, nativeMiniDfsClient frees uninitialized memory. Contributed by Colin Patrick McCabe. (Revision 1405149) Result = FAILURE todd : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1405149 Files : * /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt * /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/native/libhdfs/native_mini_dfs.c > when libwebhdfs is not enabled, nativeMiniDfsClient frees uninitialized memory > ------------------------------------------------------------------------------- > > Key: HDFS-4132 > URL: https://issues.apache.org/jira/browse/HDFS-4132 > Project: Hadoop HDFS > Issue Type: Bug > Components: libhdfs > Affects Versions: 2.0.3-alpha > Reporter: Colin Patrick McCabe > Assignee: Colin Patrick McCabe > Fix For: 3.0.0, 2.0.3-alpha > > Attachments: HDFS-4132.001.patch > > > When libwebhdfs is not enabled, nativeMiniDfsClient frees uninitialized memory. > Details: jconfStr is declared uninitialized... > {code} > struct NativeMiniDfsCluster* nmdCreate(struct NativeMiniDfsConf *conf) > { > struct NativeMiniDfsCluster* cl = NULL; > jobject bld = NULL, bld2 = NULL, cobj = NULL; > jvalue val; > JNIEnv *env = getJNIEnv(); > jthrowable jthr; > jstring jconfStr; > {code} > and only initialized later if conf->webhdfsEnabled: > {code} > ... > if (conf->webhdfsEnabled) { > jthr = newJavaStr(env, DFS_WEBHDFS_ENABLED_KEY, &jconfStr); > if (jthr) { > printExceptionAndFree(env, jthr, PRINT_EXC_ALL, > ... > {code} > Then we try to free this uninitialized memory at the end, usually resulting in a crash. > {code} > (*env)->DeleteLocalRef(env, jconfStr); > return cl; > {code} -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira