From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 664ABA04C0; Fri, 25 Sep 2020 18:59:54 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E2B761E88D; Fri, 25 Sep 2020 18:59:52 +0200 (CEST) Received: from hqnvemgate25.nvidia.com (hqnvemgate25.nvidia.com [216.228.121.64]) by dpdk.org (Postfix) with ESMTP id 66DBA1E877; Fri, 25 Sep 2020 18:59:50 +0200 (CEST) Received: from hqmail.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate25.nvidia.com (using TLS: TLSv1.2, AES256-SHA) id ; Fri, 25 Sep 2020 09:59:00 -0700 Received: from HQMAIL111.nvidia.com (172.20.187.18) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Fri, 25 Sep 2020 16:59:41 +0000 Received: from NAM02-BL2-obe.outbound.protection.outlook.com (104.47.38.50) by HQMAIL111.nvidia.com (172.20.187.18) with Microsoft SMTP Server (TLS) id 15.0.1473.3 via Frontend Transport; Fri, 25 Sep 2020 16:59:41 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mvWezGZ6u1oQKeWy0CkJgw6PvVUCHLBsNHytJUWomhRYiRgkkPfIf8j2FN9DRMUbmce0XeXN+9EVt4+T3gwKp45CaTRA5MXTZKvTDR2cCiIk5rtgwMw1UGcJmmelOMuI5s1HLF+Grgoa6st/BN8raXDIp2x0mrG5RR8W+pOFlCpOQP4AsEaJNu/VsLwVV5s2SUHFr5Ag32Sl/wys0hMkYCiL42vGaFj5jAVnE61W6gR8LF0IjTdAP+ixM3ppdIw/foownH5jt049SGmEviRawQRBTrWRm+qOG4VXfrSiKmFX8RMTxFWynRz+Wl6sS9Z0ljdzUvb9STPQDK1++zz01w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=KIHZq3YtnUU8eiFU0Q2YQISLYGh6hVfIdfyJeN4sOOw=; b=kaVkN6HodrLKz+dw92PzlIgA2zI2ecGI4aSF2hmsewksiQryoZkBZC1cigqJ2y97hQ0Mi1tvlkv1+3tm2W6m5jsAGw0vMMdVMzpioJ2ZkSqNDv+N6BByx6vN8O1nBuvLr2iVE3SNHwTgIyFOUhQ6jXLAGZatAfRxjn0D7Sbh7hbcFUhLn1DA3FMmWFg1t5PUVqhQkB3o0wsiIeDj194/sPsvL5Lg/M45fR2jkERpBGcMFcGwby/eEOORzzgmMom8s/+INoO3IDtAdyjQj5AfsIHs4wMD+hdkZkfUFxSd30d64RND7laB5woZkpQcaQL1yzT+kr2Oe61AYXoBC3ABOg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none Received: from BY5PR12MB4323.namprd12.prod.outlook.com (2603:10b6:a03:211::10) by BYAPR12MB3541.namprd12.prod.outlook.com (2603:10b6:a03:13c::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3412.20; Fri, 25 Sep 2020 16:59:39 +0000 Received: from BY5PR12MB4323.namprd12.prod.outlook.com ([fe80::41dd:a5d3:6557:f0f7]) by BY5PR12MB4323.namprd12.prod.outlook.com ([fe80::41dd:a5d3:6557:f0f7%9]) with mapi id 15.20.3412.024; Fri, 25 Sep 2020 16:59:38 +0000 From: Tal Shnaiderman To: Dmitry Kozlyuk CC: "dev@dpdk.org" , NBU-Contact-Thomas Monjalon , "pallavi.kadam@intel.com" , "ranjit.menon@intel.com" , "navasile@linux.microsoft.com" , "dmitrym@microsoft.com" , "stable@dpdk.org" Thread-Topic: [PATCH] eal/windows: fix incorrect free condition in getopt implementation Thread-Index: AQHWksjt01UdlarBvECNt9/UyTNA6ql5jymQ Date: Fri, 25 Sep 2020 16:59:38 +0000 Message-ID: References: <20200923141538.9956-1-talshn@nvidia.com> <20200925021732.7442a9df@sovereign> In-Reply-To: <20200925021732.7442a9df@sovereign> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: gmail.com; dkim=none (message not signed) header.d=none;gmail.com; dmarc=none action=none header.from=nvidia.com; x-originating-ip: [37.142.1.52] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: fb637bd1-dca0-4ea1-ebdd-08d8617463a5 x-ms-traffictypediagnostic: BYAPR12MB3541: x-ld-processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:181; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: IISEUNqykl2Dx8ftT0cfSvE/Yujuhlv2Qs8S0DGZ4fR71KFC6sPhe0hDShE47f1+918GPjMuq/1uPf4JrSScCgp2t/xCv/0qqKidlcZUqpw4eHPoCRgM7w9hdTPxox+sQhThQjybtdZBDTwLsnElOVS/+eYgoKlYJwDadwpVEtcWOhABFPZznYQthA5puob6aAFTjz7hUuv2exXVC9wc94JlAodXAmppaSU7c+vRMmB6fUJEheKD+UfOEPSXG7gu7jSRvDsijyYEkzg3Y3XdWRAjDedOG4ghPXpy2XJk8Z7z34fHP5O+XYd7fggo3uov04ewgVSjTDVskNNUzUzMOq2pmXECejcYcToRnpan/BExKKdq0y1op07Ka/xmqZOCxOZJ5kZ/nNCU+A98kG+j4w== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BY5PR12MB4323.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(136003)(346002)(376002)(366004)(396003)(39860400002)(71200400001)(5660300002)(186003)(26005)(316002)(7696005)(83380400001)(6916009)(966005)(2906002)(33656002)(4326008)(83080400001)(4744005)(76116006)(478600001)(66946007)(66556008)(66476007)(66446008)(64756008)(54906003)(6506007)(55016002)(8676002)(45080400002)(86362001)(52536014)(8936002)(9686003); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: sOgW99DvAHK6r9789t3thsGC8y91CtXzYsDQpSUBMqW6kz9NPSMxxKm/ibZaQDi5ZHfVca9YrtLA4NMdnUz8fwMMz185KtVj5vFIReKv6tIV310EQ+Dq54vtyxkEUTp9Eapi5AQBQ+nlZxAR2TsxaYEccc5MoA+JwZNOx5XPVpQu0I1s5HebijgN05tcAeXvf2QRAAjuO3q/jZh2UuTjIEs4id3zAJuL52hgUKkMBQP9QDAIKU5aXNNRMMuBh3m3Q+noVqWJL6vQriBee7UF+AWGal3tjlfI0HMfFT5xzQ/9DneKXwVOQ515JRxSVgYs03xT58uKG8fWrDQ5KkyP3PQVSsUXfcO4yRicAOMhbZwg2rNqWh1CXHGJ/LGx/q8+Dcu4D/baBnqW6J2qfxQme6/fdmDEeylopvyNSI7M8FUjdmxojo8Op+yKX0XpoIUleVeLjyGRVPH2ROvqpY/jd9NA24bTeZSn1lqPvG2PVcR2zdAanwvc5Pjk1m76ROz8defTCpNko6cHs2NtqOWhzMt7OtfZFB9Oi2Ctv8bLu+gA8k3+jZ5EV0a1+yoiY5/CC8Q4ChrRPyrhFM8suxTYc8dFmhHajr5LgfIk8eHQ5M7dpZmFl7AG1tN18IDX6KX/6dAEZVYCT/BLw4TTgRaJcQ== x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BY5PR12MB4323.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: fb637bd1-dca0-4ea1-ebdd-08d8617463a5 X-MS-Exchange-CrossTenant-originalarrivaltime: 25 Sep 2020 16:59:38.7579 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: m7Fj3VjlQ6/YGXMNkZf5AUJfXoEe/b/H0dv7xYjDI5x1sTvVrjPCoeGcSgISfMpILSQGNtUd7DdIzuhKKunkIQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR12MB3541 X-OriginatorOrg: Nvidia.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1601053140; bh=KIHZq3YtnUU8eiFU0Q2YQISLYGh6hVfIdfyJeN4sOOw=; h=ARC-Seal:ARC-Message-Signature:ARC-Authentication-Results:From:To: CC:Subject:Thread-Topic:Thread-Index:Date:Message-ID:References: In-Reply-To:Accept-Language:Content-Language:X-MS-Has-Attach: X-MS-TNEF-Correlator:authentication-results:x-originating-ip: x-ms-publictraffictype:x-ms-office365-filtering-correlation-id: x-ms-traffictypediagnostic:x-ld-processed: x-microsoft-antispam-prvs:x-ms-oob-tlc-oobclassifiers: x-ms-exchange-senderadcheck:x-microsoft-antispam: x-microsoft-antispam-message-info:x-forefront-antispam-report: x-ms-exchange-antispam-messagedata:x-ms-exchange-transport-forked: Content-Type:Content-Transfer-Encoding:MIME-Version: X-MS-Exchange-CrossTenant-AuthAs: X-MS-Exchange-CrossTenant-AuthSource: X-MS-Exchange-CrossTenant-Network-Message-Id: X-MS-Exchange-CrossTenant-originalarrivaltime: X-MS-Exchange-CrossTenant-fromentityheader: X-MS-Exchange-CrossTenant-id:X-MS-Exchange-CrossTenant-mailboxtype: X-MS-Exchange-CrossTenant-userprincipalname: X-MS-Exchange-Transport-CrossTenantHeadersStamped:X-OriginatorOrg; b=hWf0aXsFnmSTQyAeOP6Bpxr+MziHI9JCgZgnB/VTRVTj6dmc2TN1iAhIA8yXzR3/c 6QOBMgnaGybz5uYbHuURKRMNeEeujbWCLY2p0+cZnQaJELPZVuX/Yr0sb4jGPafdLs qQLyacZCdPJqCenncHm/UthvZu42jVrwbXwGe2mzDWsT2zQYEuenTwdV1lPngfDuyP KP4otAbpnjoCk8N5FBzk1KQ6Xuh0ie1k+c+NCieFYYs9/aNdssbdBLqcuPuIyiQyA6 gWl8q0S2XRLZJXJDAqDh9g66hY1zV3wSW8mZjV73bh4GIeyBXa27X2R4BJtcGwc3pD 0+PNB7WKK372g== Subject: Re: [dpdk-dev] [PATCH] eal/windows: fix incorrect free condition in getopt implementation X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" > From: Dmitry Kozlyuk > On Wed, 23 Sep 2020 17:15:38 +0300, Tal Shnaiderman wrote: > > In the Windows getopt_internal function the condition freeing the > > memory allocated by _dupenv_s is correct only for the first call to > > the function. >=20 > Hi Tal, >=20 > a few days back Khoa To and me privately discussed a patch that makes > MinGW and Clang bith use getopt.c from librte_eal (now only Clang does). > That patch includes adjustments that just remove _dupenv_s() along with > the bug. Just discovered you were not Cc'd, sorry. I put your name in > Reported-by and mentioned the bug in commit message: > https://nam11.safelinks.protection.outlook.com/?url=3Dhttp%3A%2F%2Fpatch > work.dpdk.org%2Fpatch%2F78765%2F&data=3D02%7C01%7Ctalshn%40nvi > dia.com%7Cab3a10f2d2ec458a7ef908d860e00e69%7C43083d15727340c1b7db > 39efd9ccc17a%7C0%7C0%7C637365862717871619&sdata=3D1xiI9JZ%2BUw > sv2mj8rkAcff6%2B3KFNYZUiM72ZbnkyokY%3D&reserved=3D0 Thanks for the update Dmitry, I'll mark this commit as superseded.