From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ig0-f178.google.com (mail-ig0-f178.google.com [209.85.213.178]) by dpdk.org (Postfix) with ESMTP id D781FAFCF for ; Thu, 19 Jun 2014 17:50:36 +0200 (CEST) Received: by mail-ig0-f178.google.com with SMTP id hn18so2115310igb.17 for ; Thu, 19 Jun 2014 08:50:53 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:content-type:mime-version:subject:from :in-reply-to:date:cc:content-transfer-encoding:message-id:references :to; bh=RLrtkStJ86JbqA96KHTIBp7dK5NYx11JLkcRlO38Xzg=; b=CbDQW0SI4WWqe+AmcKvfm5QoBW2elCpCDgvolRowHMTApgkCKOp9BgWnHZSg9nyeDY tU0q+kgWdzAvFpSfncqi0CJLxKX3nKwUnotPKIyHZo6EBfBrleJjyRS0sZp8Gye2nm9Y OtQ+WYiAG76TYysqy24m5yCSqt3zGiAGFlwIFT0ZaWm5YWKeQSRqYwAfVJDCunb/qUMR kaJrFa6ZastQQgirA3QXgKOyhVpdzw4yt1LG/APoNlhUhgIPlxmK+YISpQtA+IAjRHXW O7+8ffaSMB6Fq+8PWNsXLxE3rB4iYKMjiolU2otYJF9hc5qE5rF3EBwDD0qP++3fBv/P NzNQ== X-Gm-Message-State: ALoCoQnRXGqWNe+o9jbNGusKf+cxhX2Um6vh78fOsuXchgkQlpGBWXteM1SQ5B/JQ1ReShCmc5Vh X-Received: by 10.50.20.33 with SMTP id k1mr8975057ige.26.1403193053355; Thu, 19 Jun 2014 08:50:53 -0700 (PDT) Received: from [172.31.1.101] (hlfxns0187w-047055111040.dhcp-dynamic.FibreOp.ns.bellaliant.net. [47.55.111.40]) by mx.google.com with ESMTPSA id e4sm8179271igx.4.2014.06.19.08.50.52 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 19 Jun 2014 08:50:52 -0700 (PDT) Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.2\)) From: Aaron Campbell In-Reply-To: Date: Thu, 19 Jun 2014 12:50:53 -0300 Content-Transfer-Encoding: quoted-printable Message-Id: References: <1403192557-10905-1-git-send-email-aaron@arbor.net> To: "Burakov, Anatoly" X-Mailer: Apple Mail (2.1878.2) Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] [PATCH] eal: clear errno before calling strtoull() to parse base_virtaddr X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jun 2014 15:50:37 -0000 Yes, that was extremely bizarre. I didn=92t check the whole project, = but at least eal_parse_socket_mem() in the same file was already = correct. Pablo you can add me to Acked-by, obviously. :-) -Aaron On Jun 19, 2014, at 12:46 PM, Burakov, Anatoly = wrote: > Hi Aaron, >=20 > It seems that Pablo De Lara has beat you to it by a few minutes :-) = Are there any other places this could potentially happen? >=20 >> Must reset errno to zero before calling strtoull(), else on success = it could be >> any arbitrary value from past errors. >>=20 >> Signed-off-by: Aaron Campbell >> --- >> lib/librte_eal/linuxapp/eal/eal.c | 1 + >> 1 file changed, 1 insertion(+) >>=20 >> diff --git a/lib/librte_eal/linuxapp/eal/eal.c = b/lib/librte_eal/linuxapp/eal/eal.c >> index 6994303..d204387 100644 >> --- a/lib/librte_eal/linuxapp/eal/eal.c >> +++ b/lib/librte_eal/linuxapp/eal/eal.c >> @@ -562,6 +562,7 @@ eal_parse_base_virtaddr(const char *arg) >> char *end; >> uint64_t addr; >>=20 >> + errno =3D 0; >> addr =3D strtoull(arg, &end, 16); >>=20 >> /* check for errors */ >> -- >> 1.8.3.2 >=20