From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18860 invoked by alias); 29 Jul 2019 08:44:01 -0000 Mailing-List: contact elfutils-devel-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Post: List-Help: List-Subscribe: Sender: elfutils-devel-owner@sourceware.org Received: (qmail 18849 invoked by uid 89); 29 Jul 2019 08:44:01 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Checked: by ClamAV 0.100.3 on sourceware.org X-Virus-Found: No X-Spam-SWARE-Status: No, score=-5.9 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS autolearn=ham version=3.3.1 spammy=HTo:U*mark, HX-Languages-Length:484, H*Ad:U*elfutils-devel X-Spam-Status: No, score=-5.9 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on sourceware.org X-Spam-Level: X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 29 Jul 2019 08:44:00 +0000 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 09B99308A98C; Mon, 29 Jul 2019 08:43:59 +0000 (UTC) Received: from oldenburg2.str.redhat.com (ovpn-117-20.ams2.redhat.com [10.36.117.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E4D0A600F8; Mon, 29 Jul 2019 08:43:57 +0000 (UTC) From: Florian Weimer To: Mark Wielaard Cc: elfutils-devel@sourceware.org, Panu Matilainen Subject: Re: [PATCH] elfclassify tool References: <87k1fz8c9q.fsf@oldenburg2.str.redhat.com> <2e6a27c552ae5e365db54ca6b432c77c9ad5b041.camel@klomp.org> <871s22yybt.fsf@oldenburg2.str.redhat.com> <8736mfzhob.fsf@oldenburg2.str.redhat.com> <87k1cadpym.fsf@oldenburg2.str.redhat.com> <20190726221124.GA39429@wildebeest.org> Date: Mon, 29 Jul 2019 08:44:00 -0000 In-Reply-To: <20190726221124.GA39429@wildebeest.org> (Mark Wielaard's message of "Sat, 27 Jul 2019 00:11:24 +0200") Message-ID: <87ef296xir.fsf@oldenburg2.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.41]); Mon, 29 Jul 2019 08:43:59 +0000 (UTC) X-IsSubscribed: yes X-SW-Source: 2019-q3/txt/msg00087.txt.bz2 * Mark Wielaard: > + if (elf == NULL) > + { > + /* This likely means it just isn't an ELF file, probably not a > + real issue, but warn if verbose reporting. */ > + if (verbose > 0) > + fprintf (stderr, "warning: %s: %s\n", current_path, elf_errmsg (-1)); > + return false; > + } Is it possible to distinguish the error from a memory allocation error? It would be wrong to mis-classify a file just because the system is low on memory. Thanks, Florian